Function at 0x408150
Capabilities:
Get hostname
Query or enumerate registry value
Set registry value

Disassembly:
push 0xffffffffffffffff
push 0x428281
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xe40
push ebx
lea eax, [esp + 8]
push ebp
xor ebp, ebp
push eax
push 0xf003f
push ebp
mov ebx, ecx
push str.SoftwareMicrosoftWindowsCurrentVersionInternet_SettingsConnections
push reloc.WS2_32.dll_accept
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x20], ebp
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x408672
push esi
push edi
push 0x433ae8
lea ecx, [esp + 0x1c]
xor esi, esi
mov dword [esp + 0x48], ebp
mov dword [esp + 0x38], 0x200
mov dword [esp + 0x14], 0xa00
mov dword [esp + 0x30], ebp
call sub.MFC42.DLL_CString::CString_2
lea ecx, [ebx + 0x2314]
lea edx, [ebx + 0xf0a]
lea eax, [ebx + 0xa00]
mov dword [esp + 0xe58], ebp
mov dword [esp + 0x24], ecx
mov dword [esp + 0x30], edx
mov dword [esp + 0x28], eax
jmp 0x4081f1
mov esi, dword [esp + 0x4c]
mov ecx, 0x80
xor eax, eax
lea edi, [esp + 0x150]
lea edx, [esp + 0x450]
rep stosd dword es:[edi], eax
mov ecx, 0x280
lea edi, [esp + 0x450]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x10]
lea eax, [esp + 0x44]
push ecx
push edx
push eax
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x40]
push ebp
lea edx, [esp + 0x160]
push ecx
push edx
push esi
push eax
mov dword [esp + 0x54], 0x200
mov dword [esp + 0x30], 0xa00
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
inc esi
cmp eax, ebp
mov dword [esp + 0x38], eax
mov dword [esp + 0x4c], esi
jne 0x408651
lea ecx, [esp + 0x150]
push str.DefaultConnectionSettings
push ecx
call dword [sym.imp.MSVCRT.dll__stricmp]
add esp, 8
test eax, eax
je 0x4081f1
lea edx, [esp + 0x150]
push str.SavedLegacySettings
push edx
call dword [sym.imp.MSVCRT.dll__stricmp]
add esp, 8
test eax, eax
je 0x4081f1
cmp dword [esp + 0x2c], 0xa
jge 0x408651
lea eax, [esp + 0x150]
lea ecx, [esp + 0x18]
push eax
call sub.MFC42.DLL_CString::operator_2
cmp dword [esp + 0xe60], ebp
je 0x40830c
mov dl, byte [esp + 0xe64]
test dl, dl
je 0x4082ec
mov edi, dword [esp + 0x28]
mov ecx, 0x20
lea esi, [esp + 0x150]
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x30]
mov ecx, 0x80
lea esi, [esp + 0x450]
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x10]
cmp eax, 0x200
jbe 0x408300
mov eax, 0x200
mov dword [esp + 0x10], eax
test dl, dl
je 0x408320
mov ecx, dword [esp + 0x24]
mov dword [ecx], eax
jmp 0x408320
mov eax, dword [esp + 0x10]
cmp eax, 0x200
jbe 0x408320
mov eax, 0x200
mov dword [esp + 0x10], eax
cmp byte [esp + 0x458], 3
jne 0x4084ac
cmp dword [ebx + 0x2340], ebp
jne 0x408363
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x450]
push eax
mov eax, dword [esp + 0x1c]
push edx
push 3
push ebp
push eax
push ecx
mov byte [esp + 0x470], 1
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov dword [esp + 0x38], eax
jmp 0x408613
lea ecx, [esp + 0x20]
mov dword [esp + 0x48], pe_nt_image_headers32
call sub.MFC42.DLL_CString::CString_1
lea edx, [esp + 0x48]
lea eax, [esp + 0x50]
push edx
push eax
mov byte [esp + 0xe60], 1
call dword [sym.imp.KERNEL32.dll_GetComputerNameA]
test eax, eax
jne 0x408397
push str.localhost
jmp 0x40839c
lea ecx, [esp + 0x50]
push ecx
lea ecx, [esp + 0x24]
call sub.MFC42.DLL_CString::operator_2
mov edx, dword [ebx + 0x235c]
mov eax, dword [ebx + 0x98c]
mov ecx, dword [esp + 0x20]
push edx
push eax
lea edx, [esp + 0x58]
push ecx
push edx
call fcn.00402ba0
mov edx, dword [esp + 0x46c]
mov ebp, dword [esp + 0x20]
and edx, 0xff
mov eax, ebp
sub eax, edx
lea edi, [esp + 0x160]
lea esi, [esp + edx + 0x470]
add esp, 0x10
lea ecx, [eax - 0x10]
mov dword [esp + 0x10], ecx
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x50]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea esi, [esp + 0x50]
mov byte [esp + 0x45c], cl
mov ecx, dword [esp + 0x45c]
and ecx, 0xff
lea edi, [esp + 0x460]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x45c]
mov ecx, dword [esp + 0x10]
and eax, 0xff
lea esi, [esp + 0x150]
lea edi, [esp + eax + 0x460]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0x18]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x45c]
and ecx, 0xff
sub ecx, edx
lea edx, [esp + 0x450]
add ebp, ecx
mov ecx, dword [esp + 0x14]
push ebp
push edx
push 3
push 0
push eax
push ecx
mov dword [esp + 0x28], ebp
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
lea ecx, [esp + 0x20]
mov byte [esp + 0xe58], 0
call sub.MFC42.DLL_CString::CString
jmp 0x408613
cmp dword [ebx + 0x2340], ebp
je 0x408613
lea ecx, [esp + 0x1c]
mov dword [esp + 0x3c], pe_nt_image_headers32
call sub.MFC42.DLL_CString::CString_1
lea edx, [esp + 0x3c]
lea eax, [esp + 0x350]
push edx
push eax
mov byte [esp + 0xe60], 2
call dword [sym.imp.KERNEL32.dll_GetComputerNameA]
test eax, eax
jne 0x4084ef
push str.localhost
jmp 0x4084f7
lea ecx, [esp + 0x350]
push ecx
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CString::operator_2
mov edx, dword [ebx + 0x235c]
mov eax, dword [ebx + 0x98c]
mov ecx, dword [esp + 0x1c]
push edx
push eax
lea edx, [esp + 0x358]
push ecx
push edx
call fcn.00402ba0
mov edx, dword [esp + 0x46c]
mov ebp, dword [esp + 0x20]
and edx, 0xff
mov eax, ebp
sub eax, edx
lea edi, [esp + 0x160]
lea esi, [esp + edx + 0x470]
mov byte [esp + 0x468], 3
lea ebx, [eax - 0x10]
add esp, 0x10
mov ecx, ebx
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x350]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea esi, [esp + 0x350]
mov byte [esp + 0x45c], cl
mov ecx, dword [esp + 0x45c]
and ecx, 0xff
lea edi, [esp + 0x460]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x45c]
mov ecx, ebx
and eax, 0xff
lea esi, [esp + 0x150]
lea edi, [esp + eax + 0x460]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0x18]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x45c]
and ecx, 0xff
sub ecx, edx
lea edx, [esp + 0x450]
add ebp, ecx
mov ecx, dword [esp + 0x14]
push ebp
push edx
push 3
push 0
push eax
push ecx
mov dword [esp + 0x28], ebp
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
lea ecx, [esp + 0x1c]
mov byte [esp + 0xe58], 0
call sub.MFC42.DLL_CString::CString
mov ebx, dword [esp + 0x40]
mov edi, dword [esp + 0x2c]
mov esi, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x38]
xor ebp, ebp
inc edi
add esi, 4
add edx, 0x81
add ecx, 0x201
cmp eax, ebp
mov dword [esp + 0x2c], edi
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], edx
mov dword [esp + 0x30], ecx
je 0x4081ed
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0x18]
mov dword [esp + 0xe58], 0xffffffff
call sub.MFC42.DLL_CString::CString
pop edi
pop esi
mov ecx, dword [esp + 0xe48]
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0xe4c
ret 8