Code:
1001FBF5 |. 51 push ecx ; /pBufSize
1001FBF6 |. 68 343E2510 push nmtrans.10253E34 ; |Buffer = nmtrans.10253E34
1001FBFB |. 50 push eax ; |pValueType
1001FBFC |. 50 push eax ; |Reserved
1001FBFD |. 68 E4860710 push nmtrans.100786E4 ; |ValueName = "Serial"
1001FC02 |. 52 push edx ; |hKey
1001FC03 |. FF15 00C00610 call near dword ptr ds:[<&ADVAPI32.RegQueryValueExA>] ; \RegQueryValueExA
1001FC09 |. 85C0 test eax, eax
1001FC0B |. 75 0A jnz short nmtrans.1001FC17
1001FC0D |. C705 303E2510 01000000 mov dword ptr ds:[10253E30], 1
1001FC17 |> 8B4424 04 mov eax, dword ptr ss:[esp+4]
1001FC1B |. 50 push eax ; /hKey
1001FC1C |. FF15 04C00610 call near dword ptr ds:[<&ADVAPI32.RegCloseKey>] ; \RegCloseKey
1001FC22 |> 68 343E2510 push nmtrans.10253E34
1001FC27 |. 8D4C24 10 lea ecx, dword ptr ss:[esp+10]
1001FC2B |. 68 D8860710 push nmtrans.100786D8 ; ASCII "\\.\NTICE"
1001FC30 |. 51 push ecx
1001FC31 |. E8 3A000000 call nmtrans.1001FC70
...
...
1001FC70 /$ 81EC 04020000 sub esp, 204
1001FC76 |. 8A15 FC010810 mov dl, byte ptr ds:[100801FC]
1001FC7C |. 53 push ebx
1001FC7D |. 55 push ebp
1001FC7E |. 56 push esi
1001FC7F |. 57 push edi
1001FC80 |. B9 3F000000 mov ecx, 3F
1001FC85 |. 33C0 xor eax, eax
1001FC87 |. 8D7C24 15 lea edi, dword ptr ss:[esp+15]
1001FC8B |. 885424 14 mov byte ptr ss:[esp+14], dl
1001FC8F |. 889424 14010000 mov byte ptr ss:[esp+114], dl
1001FC96 |. F3:AB rep stos dword ptr es:[edi]
1001FC98 |. 66:AB stos word ptr es:[edi]
1001FC9A |. AA stos byte ptr es:[edi]
1001FC9B |. B9 3F000000 mov ecx, 3F
1001FCA0 |. 33C0 xor eax, eax
1001FCA2 |. 8DBC24 15010000 lea edi, dword ptr ss:[esp+115]
1001FCA9 |. 8BAC24 18020000 mov ebp, dword ptr ss:[esp+218]
1001FCB0 |. F3:AB rep stos dword ptr es:[edi]
1001FCB2 |. 66:AB stos word ptr es:[edi]
1001FCB4 |. AA stos byte ptr es:[edi]
1001FCB5 |. B9 40000000 mov ecx, 40
1001FCBA |. 33C0 xor eax, eax
1001FCBC |. 8BFD mov edi, ebp
1001FCBE |. 8B9424 1C020000 mov edx, dword ptr ss:[esp+21C]
1001FCC5 |. F3:AB rep stos dword ptr es:[edi]
1001FCC7 |. B9 40000000 mov ecx, 40
1001FCCC |. 8D7C24 14 lea edi, dword ptr ss:[esp+14]
1001FCD0 |. F3:AB rep stos dword ptr es:[edi]
1001FCD2 |. 8BFA mov edi, edx
1001FCD4 |. 83C9 FF or ecx, FFFFFFFF
1001FCD7 |. F2:AE repne scas byte ptr es:[edi]
1001FCD9 |. F7D1 not ecx
1001FCDB |. 49 dec ecx
1001FCDC |. 51 push ecx
1001FCDD |. 52 push edx
1001FCDE |. 55 push ebp
1001FCDF |. E8 9C2E0200 call nmtrans.10042B80
1001FCE4 |. 8BBC24 2C020000 mov edi, dword ptr ss:[esp+22C]
1001FCEB |. 83C9 FF or ecx, FFFFFFFF
1001FCEE |. 33C0 xor eax, eax
1001FCF0 |. 8D9424 20010000 lea edx, dword ptr ss:[esp+120]
1001FCF7 |. F2:AE repne scas byte ptr es:[edi]
1001FCF9 |. F7D1 not ecx
1001FCFB |. 2BF9 sub edi, ecx
1001FCFD |. 8BC1 mov eax, ecx
1001FCFF |. 8BF7 mov esi, edi
1001FD01 |. 8BFA mov edi, edx
1001FD03 |. C1E9 02 shr ecx, 2
1001FD06 |. F3:A5 rep movs dword ptr es:[edi], dword ptr ds:[esi]
1001FD08 |. 8BC8 mov ecx, eax
1001FD0A |. 83E1 03 and ecx, 3
1001FD0D |. F3:A4 rep movs byte ptr es:[edi], byte ptr ds:[esi]
1001FD0F |. 8D8C24 20010000 lea ecx, dword ptr ss:[esp+120]
1001FD16 |. 51 push ecx
1001FD17 |. E8 64650400 call nmtrans.10066280
1001FD1C |. 8BD8 mov ebx, eax
1001FD1E |. 83C9 FF or ecx, FFFFFFFF
1001FD21 |. 8BFB mov edi, ebx
1001FD23 |. 33C0 xor eax, eax
1001FD25 |. 83C4 10 add esp, 10
1001FD28 |. BE 02000000 mov esi, 2
1001FD2D |. F2:AE repne scas byte ptr es:[edi]
1001FD2F |. F7D1 not ecx
1001FD31 |. 49 dec ecx
1001FD32 |. 8D7C24 14 lea edi, dword ptr ss:[esp+14]
1001FD36 |. 894C24 10 mov dword ptr ss:[esp+10], ecx
1001FD3A |> 3B7424 10 /cmp esi, dword ptr ss:[esp+10]
1001FD3E |. 7D 22 |jge short nmtrans.1001FD62
1001FD40 |. 0FBE141E |movsx edx, byte ptr ds:[esi+ebx]
1001FD44 |. 52 |push edx
1001FD45 |. E8 44500200 |call nmtrans.10044D8E
1001FD4A |. 83C4 04 |add esp, 4
1001FD4D |. 85C0 |test eax, eax
1001FD4F |. 74 09 |je short nmtrans.1001FD5A
1001FD51 |. 8A041E |mov al, byte ptr ds:[esi+ebx]
1001FD54 |. 8807 |mov byte ptr ds:[edi], al
1001FD56 |. 47 |inc edi
1001FD57 |. C607 00 |mov byte ptr ds:[edi], 0
1001FD5A |> 83C6 02 |add esi, 2
1001FD5D |. 83FE 08 |cmp esi, 8
1001FD60 |.^ 7E D8 \jle short nmtrans.1001FD3A
1001FD62 |> 8D7C24 14 lea edi, dword ptr ss:[esp+14]
1001FD66 |. 83C9 FF or ecx, FFFFFFFF
1001FD69 |. 33C0 xor eax, eax
1001FD6B |. F2:AE repne scas byte ptr es:[edi]
1001FD6D |. F7D1 not ecx
1001FD6F |. 2BF9 sub edi, ecx
1001FD71 |. 8BF7 mov esi, edi
1001FD73 |. 8BD1 mov edx, ecx
1001FD75 |. 8BFD mov edi, ebp
1001FD77 |. 83C9 FF or ecx, FFFFFFFF
1001FD7A |. F2:AE repne scas byte ptr es:[edi]
1001FD7C |. 8BCA mov ecx, edx
1001FD7E |. 4F dec edi
1001FD7F |. C1E9 02 shr ecx, 2
1001FD82 |. F3:A5 rep movs dword ptr es:[edi], dword ptr ds:[esi]
1001FD84 |. 8BCA mov ecx, edx
1001FD86 |. 83E1 03 and ecx, 3
1001FD89 |. F3:A4 rep movs byte ptr es:[edi], byte ptr ds:[esi]
1001FD8B |. 5F pop edi
1001FD8C |. 5E pop esi
1001FD8D |. 5D pop ebp
1001FD8E |. 5B pop ebx
1001FD8F |. 81C4 04020000 add esp, 204
1001FD95 \. C3 retn
Geez ... that's a lot of work just to churn out 4 bytes
I might rip it later for further testing but for now I'll just try and invoke it normally and watch what it does with my valid serial