Function at 0x408690
Capabilities:
Get hostname

Disassembly:
push 0xffffffffffffffff
push 0x423f36
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x19c
push ebx
push ebp
mov ebp, dword [sym.imp.MSVCRT.dll_sprintf]
push esi
push edi
mov edi, ecx
mov byte [esp + 0x18], 1
mov dword [esp + 0x1c], 0
push 0
push 0x42d1a8
push str.SoftwareMicrosoftWindowsCurrentVersionInternet_Settings
xor bl, bl
call fcn.0040d010
mov esi, eax
add esp, 0xc
test esi, esi
je 0x408967
lea eax, [esp + 0x2c]
push str.ProxyEnable
push eax
mov dword [esp + 0x18], 0
call ebp
lea ecx, [esp + 0x18]
lea edx, [esp + 0x34]
push ecx
push edx
push esi
call fcn.0040d0a0
mov eax, dword [esp + 0x24]
xor ebx, ebx
add esp, 0x14
cmp eax, ebx
je 0x4087bd
lea eax, [esp + 0x2c]
push str.ProxyServer
push eax
call ebp
mov ecx, dword [edi + 0x1ef8]
lea edx, [esp + 0x34]
push ecx
push edx
push esi
call fcn.0040d140
mov eax, dword [edi + 0x1f00]
add esp, 0x14
cmp eax, ebx
je 0x408765
lea eax, [esp + 0x2c]
push str.ProxyOverride
push eax
call ebp
mov ecx, dword [edi + 0x1efc]
lea edx, [esp + 0x34]
push ecx
push edx
push esi
call fcn.0040d140
add esp, 0x14
lea eax, [esp + 0x2c]
push str.ProxyEnable
push eax
mov dword [esp + 0x18], ebx
call ebp
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x34]
push ecx
push edx
push esi
call fcn.0040d0e0
mov al, byte [esp + 0x2c]
add esp, 0x14
test al, al
je 0x408796
mov dword [edi + 0x1ef0], ebx
push 0x42becc
push 0x40e
mov ecx, edi
call sub.MFC42.DLL_CWnd::GetDlgItem
mov ecx, eax
call sub.MFC42.DLL_CWnd::SetWindowTextA
mov eax, dword [esp + 0x10]
mov bl, 1
mov dword [esp + 0x1c], eax
jmp 0x408960
lea ecx, [esp + 0x20]
mov dword [esp + 0x28], 0x100
call sub.MFC42.DLL_CString::CString_1
lea ecx, [esp + 0x14]
mov dword [esp + 0x1b4], ebx
call sub.MFC42.DLL_CString::CString_1
lea ecx, [esp + 0x14]
mov byte [esp + 0x1b4], 1
push ecx
push 0x405
mov ecx, edi
call sub.MFC42.DLL_CWnd::GetDlgItem
mov ecx, eax
call sub.MFC42.DLL_CWnd::GetWindowTextA
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::TrimRight
mov edx, dword [esp + 0x14]
push 0x42d1a8
push edx
call dword [sym.imp.MSVCRT.dll__mbscmp]
add esp, 8
test eax, eax
jne 0x40882c
push 0x42bee4
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::operator_2
lea eax, [esp + 0x28]
lea ecx, [esp + 0xac]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetComputerNameA]
test eax, eax
jne 0x40884a
push str.localhost
jmp 0x408852
lea edx, [esp + 0xac]
push edx
lea ecx, [esp + 0x24]
call sub.MFC42.DLL_CString::operator_2
lea eax, [esp + 0x2c]
push str.ProxyServer
push eax
call ebp
mov ecx, dword [edi + 0x1f0c]
mov edx, dword [esp + 0x1c]
mov ebx, dword [esp + 0x28]
add esp, 8
push ecx
push edx
call dword [sym.imp.MSVCRT.dll_atoi]
add esp, 4
push eax
lea eax, [esp + 0xb4]
push ebx
push eax
call fcn.00402ba0
lea ecx, [esp + 0xbc]
lea edx, [esp + 0x3c]
push ecx
push edx
push esi
call fcn.0040d140
mov eax, dword [edi + 0x1f00]
add esp, 0x1c
test eax, eax
je 0x4088e3
lea eax, [esp + 0x2c]
push str.ProxyOverride
push eax
call ebp
lea ecx, [esp + 0xb4]
push str._local_
push ecx
call ebp
lea edx, [esp + 0xbc]
lea eax, [esp + 0x3c]
push edx
push eax
push esi
call fcn.0040d140
add esp, 0x1c
lea ecx, [esp + 0x2c]
mov ebx, 1
push str.ProxyEnable
push ecx
mov dword [esp + 0x18], ebx
call ebp
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x34]
push edx
push eax
push esi
call fcn.0040d0e0
mov al, byte [esp + 0x2c]
add esp, 0x14
test al, al
je 0x408919
mov dword [edi + 0x1ef0], ebx
push 0x42beb4
push 0x40e
mov ecx, edi
call sub.MFC42.DLL_CWnd::GetDlgItem
mov ecx, eax
call sub.MFC42.DLL_CWnd::SetWindowTextA
mov ecx, dword [esp + 0x10]
mov bl, 1
mov dword [esp + 0x1c], ecx
lea ecx, [esp + 0x14]
mov byte [esp + 0x1b4], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x20]
mov dword [esp + 0x1b4], 0xffffffff
call sub.MFC42.DLL_CString::CString
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [esp + 0x18]
mov ecx, edi
push edx
push 0
call fcn.00407a70
test bl, bl
je 0x408a1f
mov al, byte [esp + 0x18]
test al, al
je 0x408a1f
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x64
call esi
push 0
push 0
push 0x27
push 0
call dword [sym.imp.WININET.dll_InternetSetOptionA]
test eax, eax
push 0x64
jne 0x4089b3
call esi
mov byte [esp + 0x18], 0
jmp 0x4086c4
call esi
push 0
push 0x42d1a8
push str.SoftwareMicrosoftWindowsCurrentVersionInternet_Settings
call fcn.0040d010
mov esi, eax
add esp, 0xc
test esi, esi
je 0x408a1f
lea eax, [esp + 0x6c]
push str.ProxyEnable
push eax
mov dword [esp + 0x2c], 0
call ebp
lea ecx, [esp + 0x2c]
lea edx, [esp + 0x74]
push ecx
push edx
push esi
call fcn.0040d0a0
add esp, 0x14
test eax, eax
je 0x408a02
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x24], eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x24]
cmp eax, ecx
je 0x408a1f
mov byte [esp + 0x18], 0
jmp 0x4086c4
mov ecx, edi
call fcn.0040aec0
mov ecx, dword [esp + 0x1ac]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x1a8
ret