Function at 0x4025d0
Capabilities:
Connect socket
Get common file path
Get local ipv4 addresses
Get socket information
Link many functions at runtime
Set socket configuration

Disassembly:
sub esp, 0x300
push ebx
push ebp
push esi
mov ebp, ecx
push edi
xor ebx, ebx
mov ecx, 7
xor eax, eax
lea edi, [esp + 0x5d]
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 + 0x40]
mov dword [esp + 0x3c], ebx
rep stosd dword es:[edi], eax
mov ecx, 8
lea edi, [esp + 0x3c]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x318]
mov edx, dword [esp + 0x3c]
push eax
lea ecx, [esp + 0x60]
or edx, 2
push 0x41270c
push ecx
mov dword [esp + 0x40], 0xffffffff
mov dword [ebp + 0x7c], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x50], 1
mov dword [esp + 0x48], edx
call dword [sym.imp.MSVCRT.dll_sprintf]
mov eax, dword [0x41404c]
add esp, 0xc
cmp eax, ebx
jne 0x402808
mov eax, dword [0x414048]
mov dword [esp + 0x18], str.getaddrinfo
cmp eax, ebx
mov dword [esp + 0x1c], 0x403780
mov dword [esp + 0x20], str.getnameinfo
mov dword [esp + 0x24], 0x403ec0
mov dword [esp + 0x28], str.freeaddrinfo
mov dword [esp + 0x2c], 0x403730
jne 0x4027fe
lea edx, [esp + 0x208]
push 0x104
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x4027f4
lea edi, [esp + 0x208]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x7c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x7c]
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]
mov edi, str.ws2_32
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x7c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
cmp esi, ebx
je 0x402736
push str.getaddrinfo
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x4027b6
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea edi, [esp + 0x208]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x7c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x7c]
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]
mov edi, str.wship6
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x7c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
cmp esi, ebx
je 0x4027f4
push str.getaddrinfo
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x4027b6
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x4027f4
mov dword [esp + 0x14], ebx
lea edi, [esp + 0x1c]
mov ecx, dword [edi - 4]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
mov dword [edi], eax
je 0x4027ad
mov eax, dword [esp + 0x14]
add edi, 8
inc eax
cmp eax, 3
mov dword [esp + 0x14], eax
jl 0x4027be
xor eax, eax
mov edx, dword [esp + eax + 0x1c]
mov dword [eax + 0x41272c], edx
add eax, 8
cmp eax, 0x18
jl 0x4027e2
mov dword [0x414048], 1
mov eax, dword [0x41272c]
mov dword [0x41404c], eax
mov esi, dword [esp + 0x314]
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x40]
lea ecx, [esp + 0x60]
push edx
push ecx
push esi
call eax
mov edi, eax
push edi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
cmp edi, ebx
jne 0x402ae6
mov ecx, 0x1f
xor eax, eax
lea edi, [esp + 0x189]
mov byte [esp + 0x188], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea edx, [esp + 0x14]
lea eax, [esp + 0x188]
push edx
push eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x1c], 0x78
push ebx
mov ecx, dword [eax + 0x10]
mov edx, dword [eax + 0x18]
push ecx
push edx
call dword [sym.imp.WS2_32.dll_WSAAddressToStringA]
lea eax, [esp + 0x188]
push eax
push esi
push str.Connect_To:__s__s_
push 4
call fcn.00402210
mov ecx, dword [esp + 0x20]
add esp, 0x10
mov edx, dword [ecx + 4]
push 1
push ebx
push ebx
push ebx
push 1
push edx
call dword [sym.imp.WS2_32.dll_WSASocketA]
mov esi, eax
cmp esi, 0xffffffff
je 0x40292c
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + 0x10]
mov edx, dword [eax + 0x18]
push ecx
push edx
push esi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x40292c
lea eax, [esp + 0x38]
push 4
push eax
push 1
push 6
push esi
mov dword [esp + 0x4c], 1
call dword [sym.imp.WS2_32.dll_setsockopt]
mov ecx, ebp
mov dword [esp + 0x34], ebx
mov dword [ebp + 0x10], esi
call fcn.00402520
xor ecx, ecx
lea edx, [esp + 0x30]
mov dword [esp + 0x1a], ecx
lea eax, [esp + 0x18]
mov dword [esp + 0x1e], ecx
push edx
mov dword [esp + 0x26], ecx
push eax
push esi
mov word [esp + 0x24], bx
mov word [esp + 0x32], cx
mov dword [esp + 0x3c], 0x10
call dword [sym.imp.WS2_32.dll_getsockname]
cmp word [esp + 0x18], 2
jne 0x40292c
mov ecx, dword [esp + 0x1c]
mov dword [ebp + 0x7c], ecx
mov eax, dword [0x414044]
mov edx, dword [esp + 0x10]
cmp eax, ebx
mov dword [esp + 0x30], edx
jne 0x402adf
mov eax, dword [0x414048]
mov dword [esp + 0x18], str.getaddrinfo
cmp eax, ebx
mov dword [esp + 0x1c], 0x403780
mov dword [esp + 0x20], str.getnameinfo
mov dword [esp + 0x24], 0x403ec0
mov dword [esp + 0x28], str.freeaddrinfo
mov dword [esp + 0x2c], 0x403730
jne 0x402ad5
lea eax, [esp + 0x208]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x402acb
lea edi, [esp + 0x208]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x7c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x7c]
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]
mov edi, str.ws2_32
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
mov ebp, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
and ecx, 3
lea eax, [esp + 0x7c]
rep movsb byte es:[edi], byte [esi]
push eax
call ebp
mov esi, eax
cmp esi, ebx
je 0x402a1d
push str.getaddrinfo
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x402a99
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea edi, [esp + 0x208]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x7c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x7c]
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]
mov edi, str.wship6
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x7c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call ebp
mov esi, eax
cmp esi, ebx
je 0x402acb
push str.getaddrinfo
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x402a99
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x402acb
xor ebp, ebp
lea edi, [esp + 0x1c]
mov ecx, dword [edi - 4]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
mov dword [edi], eax
je 0x402a90
inc ebp
add edi, 8
cmp ebp, 3
jl 0x402a9f
mov edx, dword [esp + ebx + 0x1c]
mov dword [ebx + 0x41272c], edx
add ebx, 8
cmp ebx, 0x18
jl 0x402ab9
mov dword [0x414048], 1
mov eax, dword [0x41273c]
mov dword [0x414044], eax
mov ecx, dword [esp + 0x30]
push ecx
call eax
mov eax, dword [esp + 0x34]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x300
ret 8