Function at 0x4017e0
Capabilities:
Connect socket
Create process on windows
Get socket status
Read .ini file
Resolve dns
Set socket configuration

Disassembly:
push 0xffffffffffffffff
push 0x404ffb
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x9a4
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov dword [esp + 0x14], esi
mov eax, dword [esi + 0x20]
push eax
call fcn.00403cd0
xor ebx, ebx
add esp, 4
cmp eax, ebx
mov dword [esi + 0x70], eax
jne 0x40183f
mov ecx, dword [esi + 0x20]
push 0x40010
push 0x40806c
push 0x40816c
push ecx
call dword [sym.imp.USER32.dll_MessageBoxA]
push ebx
call dword [sym.imp.USER32.dll_PostQuitMessage]
jmp 0x401fcf
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
push str..User.ini
push ebx
push str.Proxytype
push str.Proxy
call esi
push str..User.ini
push ebx
push str.Port
push str.Proxy
mov dword [esp + 0x28], eax
call esi
mov dword [esp + 0x10], eax
mov ecx, 7
xor eax, eax
lea edi, [esp + 0xc1]
mov byte [esp + 0xc0], bl
mov byte [esp + 0x5c], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 7
xor eax, eax
lea edi, [esp + 0x5d]
mov byte [esp + 0xe0], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 7
xor eax, eax
lea edi, [esp + 0xe1]
mov ebp, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
rep stosd dword es:[edi], eax
push str..User.ini
lea edx, [esp + 0xc4]
push 0x1f
push edx
stosw word es:[edi], ax
push 0x40859c
push str.ServerAdress
push str.Proxy
stosb byte es:[edi], al
call ebp
push str..User.ini
push ebx
push str.UseUsername
push str.Proxy
call esi
test eax, eax
je 0x401934
push str..User.ini
lea eax, [esp + 0x60]
push 0x1f
push eax
push 0x40859c
push str.Username
push str.Proxy
call ebp
push str..User.ini
lea ecx, [esp + 0xe4]
push 0x1f
push ecx
push 0x40859c
push str.Password
push str.Proxy
call ebp
jmp 0x40193f
mov byte [esp + 0x5c], bl
mov byte [esp + 0xe0], bl
push str.._server.ini
push ebx
push str.cursel
push str.Server
call esi
mov edx, eax
mov ecx, 7
xor eax, eax
lea edi, [esp + 0x131]
mov byte [esp + 0x130], bl
push edx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea edx, [esp + 0x134]
push str.nettype_d
push edx
stosb byte es:[edi], al
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea eax, [esp + 0x130]
push str.._server.ini
push ebx
push eax
push str.server
call esi
mov edx, eax
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x1a5]
mov byte [esp + 0x1a4], bl
mov byte [esp + 0x100], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 7
xor eax, eax
lea edi, [esp + 0x101]
push edx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x104]
push str.IP_d
push ecx
stosb byte es:[edi], al
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea edx, [esp + 0x1a4]
lea eax, [esp + 0x100]
push str.._server.ini
push 0xff
push edx
push 0x40859c
push eax
push str.UPDATESERVER
call ebp
push str.._server.ini
push 0x275d
push str.Port
push str.UPDATESERVER
call esi
push str.._server.ini
push ebx
push str.CLIENTTYPE
push str.UPDATESERVER
mov ebp, eax
call esi
lea ecx, [esp + 0x34]
call fcn.004023a0
mov eax, dword [esp + 0x18]
mov dword [esp + 0x9bc], ebx
cmp eax, 2
jne 0x401b8d
mov ecx, 0x102
xor eax, eax
lea edi, [esp + 0x2a4]
lea edx, [esp + 0x3a6]
rep stosd dword es:[edi], eax
or ecx, 0xffffffff
lea edi, [esp + 0x1a4]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
shr ecx, 2
mov edi, edx
lea edx, [esp + 0x2a4]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
or ecx, 0xffffffff
lea edi, [esp + 0xc0]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov word [esp + 0x4a6], bp
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov cx, word [esp + 0x10]
lea edi, [esp + 0x5c]
mov word [esp + 0x3a4], cx
mov cl, byte [esp + 0x5c]
cmp cl, bl
setne dl
or ecx, 0xffffffff
xor eax, eax
and edx, 0xff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [esp + 0x4a8], edx
lea edx, [esp + 0x4ac]
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
lea edx, [esp + 0x5ab]
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0xe0]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x2a4]
push ecx
lea ecx, [esp + 0x38]
call fcn.00402600
test al, al
jne 0x401b73
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x80]
lea edx, [esp + 0x1c]
rep stosd dword es:[edi], eax
mov dword [esp + 0x7c], 0x44
push edx
lea eax, [esp + 0x80]
jmp 0x401fa1
lea ecx, [esp + 0x34]
call fcn.00402bc0
mov ecx, dword [esp + 0x14]
add ecx, 0x70
mov edx, dword [ecx]
mov dword [edx + 8], eax
jmp 0x401f33
mov edi, 1
cmp eax, edi
jne 0x401c6d
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x7b0]
lea edx, [esp + 0x8b2]
rep stosd dword es:[edi], eax
lea edi, [esp + 0x1a4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x7b0]
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 + 0xc0]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov word [esp + 0x9b2], bp
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x7b0]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov cx, word [esp + 0x14]
mov word [esp + 0x8b4], cx
lea ecx, [esp + 0x38]
call fcn.00402410
test al, al
jne 0x401c52
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x80]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x1c]
lea ecx, [esp + 0x7c]
push eax
mov dword [esp + 0x80], 0x44
push ecx
jmp 0x401fa2
lea ecx, [esp + 0x34]
call fcn.00402bc0
mov edx, dword [esp + 0x14]
lea ecx, [edx + 0x70]
mov ecx, dword [edx + 0x70]
mov dword [ecx + 8], eax
jmp 0x401f33
cmp eax, 3
jne 0x401d9a
mov ecx, 0x102
xor eax, eax
lea edi, [esp + 0x2a4]
lea edx, [esp + 0x3a6]
rep stosd dword es:[edi], eax
or ecx, 0xffffffff
lea edi, [esp + 0x1a4]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
shr ecx, 2
mov edi, edx
lea edx, [esp + 0x2a4]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
or ecx, 0xffffffff
lea edi, [esp + 0xc0]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov word [esp + 0x4a6], bp
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov cx, word [esp + 0x10]
lea edi, [esp + 0x5c]
mov word [esp + 0x3a4], cx
mov cl, byte [esp + 0x5c]
cmp cl, bl
setne dl
or ecx, 0xffffffff
xor eax, eax
and edx, 0xff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [esp + 0x4a8], edx
lea edx, [esp + 0x4ac]
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
lea edx, [esp + 0x5ab]
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0xe0]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x2a4]
push ecx
lea ecx, [esp + 0x38]
call fcn.00402880
test al, al
jne 0x401b73
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x80]
lea edx, [esp + 0x1c]
rep stosd dword es:[edi], eax
mov dword [esp + 0x7c], 0x44
push edx
lea eax, [esp + 0x80]
jmp 0x401fa1
push 6
push edi
push 2
call sub.WSOCK32.dll_socket
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx + 0x70]
lea esi, [ecx + 0x70]
mov dword [esp + 0x2c], esi
mov dword [edx + 8], eax
mov eax, dword [esi]
cmp dword [eax + 8], 0xffffffff
jne 0x401de7
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x80]
lea edx, [esp + 0x7c]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x120]
mov dword [esp + 0x7c], 0x44
push ecx
push edx
jmp 0x401fa2
lea eax, [esp + 0x1a4]
push eax
call sub.WSOCK32.dll_inet_addr
cmp eax, 0xffffffff
jne 0x401e39
lea ecx, [esp + 0x1a4]
push ecx
call sub.WSOCK32.dll_gethostbyname
cmp eax, ebx
je 0x401e44
mov dx, word [eax + 8]
lea edi, [esp + 0x20]
mov word [esp + 0x1c], dx
movsx ecx, word [eax + 0xa]
mov eax, dword [eax + 0xc]
mov edx, ecx
shr ecx, 2
mov esi, dword [eax]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x2c]
mov edi, 1
jmp 0x401e44
mov word [esp + 0x1c], 2
mov dword [esp + 0x20], eax
push ebp
call sub.WSOCK32.dll_htons
mov ecx, dword [esi]
mov word [esp + 0x1e], ax
lea eax, [esp + 0x10]
mov dword [esp + 0x30], 4
mov dword [esp + 0x10], edi
mov edx, dword [ecx + 8]
push eax
push 0x8004667e
push edx
call sub.WSOCK32.dll_ioctlsocket
mov ecx, dword [esi]
lea eax, [esp + 0x1c]
push 0x10
push eax
mov edx, dword [ecx + 8]
push edx
call sub.WSOCK32.dll_connect
cmp eax, ebx
mov dword [esp + 0x18], eax
je 0x401f1a
mov eax, dword [esi]
mov dword [esp + 0x54], edi
mov dword [esp + 0x58], ebx
mov dword [esp + 0x6ac], ebx
mov ecx, dword [eax + 8]
lea edx, [esp + 0x54]
push edx
lea eax, [esp + 0x6b0]
push ebx
push eax
push ebx
push ebx
mov dword [esp + 0x6c4], ecx
mov dword [esp + 0x6c0], edi
call sub.WSOCK32.dll_select
test eax, eax
jle 0x401ee8
mov eax, dword [esi]
lea ecx, [esp + 0x30]
lea edx, [esp + 0x18]
push ecx
mov ecx, dword [eax + 8]
push edx
push 0x1007
push 0xffff
push ecx
call sub.WSOCK32.dll_getsockopt
cmp dword [esp + 0x18], ebx
je 0x401f1a
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x80]
lea edx, [esp + 0x120]
rep stosd dword es:[edi], eax
mov dword [esp + 0x7c], 0x44
push edx
lea eax, [esp + 0x80]
jmp 0x401fa1
mov edx, dword [esi]
lea ecx, [esp + 0x10]
mov dword [esp + 0x10], ebx
push ecx
mov eax, dword [edx + 8]
push 0x8004667e
push eax
call sub.WSOCK32.dll_ioctlsocket
mov ecx, dword [esp + 0x14]
push 0x10
mov edi, ecx
mov edx, dword [ecx + 0x70]
lea esi, [ecx + 0x70]
mov ecx, dword [edi + 0x20]
mov eax, dword [edx + 8]
push eax
push 0x412
push ecx
call dword [sym.imp.USER32.dll_PostMessageA]
mov eax, dword [esi]
mov edx, dword [edi + 0x20]
push 0x21
push 0x412
mov ecx, dword [eax + 8]
push edx
push ecx
call sub.WSOCK32.dll_WSAAsyncSelect
cmp eax, ebx
je 0x401fbb
push esi
call fcn.00403dc0
add esp, 4
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x164]
lea edx, [esp + 0x150]
rep stosd dword es:[edi], eax
mov dword [esp + 0x160], 0x44
push edx
lea eax, [esp + 0x164]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push str..Main.exe
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
push ebx
call dword [sym.imp.USER32.dll_PostQuitMessage]
lea ecx, [esp + 0x34]
mov dword [esp + 0x9bc], 0xffffffff
call fcn.004023e0
mov ecx, dword [esp + 0x9b4]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x9b0
ret