Function at 0x404c90
Capabilities:
Check if file exists
Read .ini file
Resolve dns

Disassembly:
push 0xffffffffffffffff
push 0x410989
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x128
push ebx
push ebp
push esi
mov esi, ecx
push edi
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x20]
mov dword [esp + 0x140], 0
call sub.MFC42.DLL_CString::CString
mov ebp, dword [esp + 0x14c]
mov byte [esp + 0x140], 1
test ebp, ebp
je 0x4051a4
mov ecx, 0x45
xor eax, eax
mov edi, ebp
rep stosd dword es:[edi], eax
mov eax, dword [esi + 0x134]
test eax, eax
je 0x404d1a
lea eax, [esi + 0x858]
push str.Download_testSvr.ini
lea ecx, [esp + 0x1c]
push eax
push ecx
call sub.MFC42.DLL_operator
mov byte [esp + 0x140], 2
jmp 0x404d38
lea edx, [esi + 0x858]
push str.DownloadDownSvrListNew.ini
lea eax, [esp + 0x1c]
push edx
push eax
call sub.MFC42.DLL_operator
mov byte [esp + 0x140], 3
lea ecx, [esp + 0x10]
push eax
call fcn.0040f8b0
lea ecx, [esp + 0x18]
mov byte [esp + 0x140], 1
call fcn.0040f790
push 0x4166bc
push 0
call fcn.00409b00
mov ecx, dword [esp + 0x18]
add esp, 8
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x404dc1
push 0x41668c
lea ecx, [esp + 0x24]
call fcn.0040f84a
mov edx, dword [esp + 0x20]
push 0
push 0x416680
push edx
mov ecx, esi
call fcn.004069c0
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, dword [esp + 0x20]
push eax
push 0
call fcn.00409b00
add esp, 8
mov ecx, esi
push 0
push 0
push 0x12
call fcn.004069c0
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
jmp 0x4051a4
mov ecx, dword [esp + 0x10]
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
push ecx
push 0
push str.ServerNum
push str.PUBLIC
call edi
mov esi, dword [esp + 0x148]
cmp eax, esi
jg 0x404df9
push 0x416644
push 0
call fcn.00409b00
add esp, 8
jmp 0x4051a4
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x30]
mov byte [esp + 0x140], 4
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x2c]
mov byte [esp + 0x140], 5
call sub.MFC42.DLL_CString::CString
push esi
lea edx, [esp + 0x18]
push str.DIRSERVER_d
push edx
mov byte [esp + 0x14c], 6
call sub.MFC42.DLL_CString::Format
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
add esp, 0xc
push eax
push 0
push 0x416634
push ecx
call edi
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov ebx, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov dword [ebp], eax
push edx
lea eax, [ebp + 0x14]
push 0x20
push eax
push 0x417dd0
push str.name
push ecx
call ebx
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
lea esi, [ebp + 0x34]
push edx
push 0x50
push esi
push 0x417dd0
push str.host
push eax
call ebx
lea ecx, [esp + 0x28]
mov byte [esp + 0x1f], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x24]
mov byte [esp + 0x140], 7
call sub.MFC42.DLL_CString::CString
push esi
lea ecx, [esp + 0x28]
mov byte [esp + 0x144], 8
call fcn.0040f84a
push 0
push 0x416620
lea ecx, [esp + 0x2c]
call sub.MFC42.DLL_CString::Find_2
lea ecx, [esp + 0x18]
push eax
push ecx
lea ecx, [esp + 0x2c]
call sub.MFC42.DLL_CString::Left
push eax
lea ecx, [esp + 0x2c]
mov byte [esp + 0x144], 9
call fcn.0040f8b0
lea ecx, [esp + 0x18]
mov byte [esp + 0x140], 8
call fcn.0040f790
mov edx, dword [esp + 0x28]
push edx
push 0
call fcn.00409b00
add esp, 8
mov eax, dword [esp + 0x28]
mov esi, dword [sym.imp.WS2_32.dll_inet_addr]
mov ecx, dword [eax - 8]
test ecx, ecx
je 0x404f77
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x4050ed
mov eax, dword [eax + 0xc]
mov ecx, dword [eax]
mov edx, dword [ecx]
push edx
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::CString_2
mov eax, dword [esp + 0x18]
mov ecx, dword [eax - 8]
test ecx, ecx
je 0x404f66
push eax
call esi
mov dword [ebp + 0x88], eax
mov byte [esp + 0x1f], 1
lea ecx, [esp + 0x18]
call fcn.0040f790
mov al, byte [esp + 0x1f]
test al, al
jne 0x404fbf
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x35]
mov byte [esp + 0x34], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x34]
stosb byte es:[edi], al
mov eax, dword [esp + 0x10]
push eax
push 0x104
push ecx
push 0x417dd0
push 0x41661c
push edx
call ebx
lea eax, [esp + 0x34]
push eax
call esi
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov dword [ebp + 0x88], eax
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
push ecx
push 0
push str.port
push edx
call edi
test ax, ax
mov word [ebp + 0x86], ax
je 0x4050fe
mov eax, dword [ebp + 0x88]
test eax, eax
je 0x4050fe
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
lea esi, [ebp + 4]
push eax
push 0x10
push esi
push 0x417dd0
push str.style
push ecx
call ebx
mov edi, 0x416608
mov ecx, 4
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x40505a
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
push eax
lea ecx, [ebp + 0x94]
push 0x40
push ecx
push 0x417dd0
push str.USER
push edx
call ebx
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
push eax
add ebp, 0xd4
push 0x40
push ebp
push 0x417dd0
push str.PASS
push ecx
call ebx
push 0x4165ec
push 0
call fcn.00409b00
add esp, 8
lea ecx, [esp + 0x24]
mov byte [esp + 0x140], 7
call fcn.0040f790
lea ecx, [esp + 0x28]
mov byte [esp + 0x140], 6
call fcn.0040f790
lea ecx, [esp + 0x2c]
mov byte [esp + 0x140], 5
call fcn.0040f790
lea ecx, [esp + 0x30]
mov byte [esp + 0x140], 4
call fcn.0040f790
lea ecx, [esp + 0x14]
mov byte [esp + 0x140], 1
call fcn.0040f790
lea ecx, [esp + 0x20]
mov byte [esp + 0x140], 0
call fcn.0040f790
lea ecx, [esp + 0x10]
mov dword [esp + 0x140], 0xffffffff
call fcn.0040f790
mov eax, 1
jmp 0x4051cb
push 0x4165e0
push 0
call fcn.00409b00
add esp, 8
jmp 0x40514f
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::CString
mov edx, dword [ebp + 0x88]
xor eax, eax
mov ax, word [ebp + 0x86]
push edx
push eax
lea ecx, [esp + 0x20]
push 0x4165d0
push ecx
mov byte [esp + 0x150], 0xa
call sub.MFC42.DLL_CString::Format
mov edx, dword [esp + 0x28]
push edx
push 0
call fcn.00409b00
add esp, 0x18
lea ecx, [esp + 0x18]
mov byte [esp + 0x140], 8
call fcn.0040f790
lea ecx, [esp + 0x24]
mov byte [esp + 0x140], 7
call fcn.0040f790
lea ecx, [esp + 0x28]
mov byte [esp + 0x140], 6
call fcn.0040f790
lea ecx, [esp + 0x2c]
mov byte [esp + 0x140], 5
call fcn.0040f790
lea ecx, [esp + 0x30]
mov byte [esp + 0x140], 4
call fcn.0040f790
lea ecx, [esp + 0x14]
mov byte [esp + 0x140], 1
call fcn.0040f790
lea ecx, [esp + 0x20]
mov byte [esp + 0x140], 0
call fcn.0040f790
lea ecx, [esp + 0x10]
mov dword [esp + 0x140], 0xffffffff
call fcn.0040f790
xor eax, eax
mov ecx, dword [esp + 0x138]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x134
ret 8