Function at 0x404430
Capabilities:
Connect socket
Get common file path
Initialize winsock library
Link many functions at runtime

Disassembly:
sub esp, 0x7f0
lea eax, [esp + 0x660]
push ebx
push ebp
push esi
push edi
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x404467
call dword [sym.imp.WS2_32.dll_WSACleanup]
pop edi
pop esi
pop ebp
mov eax, 0xfffffff7
pop ebx
add esp, 0x7f0
ret
mov ecx, 8
xor eax, eax
lea edi, [esp + 0x38]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x80c]
mov dword [esp + 0x3c], eax
mov eax, dword [0x42a734]
mov dword [esp + 0x40], ecx
test eax, eax
jne 0x404643
mov eax, dword [0x42a730]
mov dword [esp + 0x10], str.getaddrinfo
test eax, eax
mov dword [esp + 0x14], 0x4049b0
mov dword [esp + 0x18], str.getnameinfo
mov dword [esp + 0x1c], 0x4050b0
mov dword [esp + 0x20], str.freeaddrinfo
mov dword [esp + 0x24], 0x404960
jne 0x404639
lea edx, [esp + 0x164]
push 0x104
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x40462f
lea edi, [esp + 0x164]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x58]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x58]
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 ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
mov ebx, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
and ecx, 3
lea eax, [esp + 0x58]
rep movsb byte es:[edi], byte [esi]
push eax
call ebx
mov esi, eax
test esi, esi
je 0x404570
mov ebp, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.getaddrinfo
push esi
call ebp
test eax, eax
jne 0x4045ee
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x404576
mov ebp, dword [sym.imp.KERNEL32.dll_GetProcAddress]
lea edi, [esp + 0x164]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x58]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x58]
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 + 0x58]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call ebx
mov esi, eax
test esi, esi
je 0x40462f
push str.getaddrinfo
push esi
call ebp
test eax, eax
jne 0x4045ee
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x40462f
mov ecx, dword [0x41d258]
xor ebx, ebx
test ecx, ecx
jle 0x404619
lea edi, [esp + 0x14]
mov ecx, dword [edi - 4]
push ecx
push esi
call ebp
test eax, eax
mov dword [edi], eax
je 0x4045e5
mov ecx, dword [0x41d258]
inc ebx
add edi, 8
cmp ebx, ecx
jl 0x4045fe
xor eax, eax
test ecx, ecx
jle 0x40462f
mov edx, dword [esp + eax*8 + 0x14]
mov dword [eax*8 + 0x41fcac], edx
inc eax
cmp eax, ecx
jl 0x40461f
mov dword [0x42a730], 1
mov eax, dword [0x41fcac]
mov dword [0x42a734], eax
lea ecx, [esp + 0x34]
lea edx, [esp + 0x38]
push ecx
mov ecx, dword [esp + 0x80c]
push edx
mov edx, dword [esp + 0x80c]
push ecx
push edx
call eax
mov esi, eax
push esi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
test esi, esi
je 0x404682
call dword [sym.imp.WS2_32.dll_WSACleanup]
pop edi
pop esi
pop ebp
mov eax, 0xfffffff7
pop ebx
add esp, 0x7f0
ret
mov eax, dword [esp + 0x34]
test eax, eax
mov ebp, eax
je 0x404930
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 4]
push eax
push ecx
push edx
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
cmp edi, 0xffffffff
mov dword [esp + 0x30], edi
je 0x40490b
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0x18]
push eax
push ecx
push edi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x40492c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov eax, dword [ebp + 0x18]
mov edx, dword [ebp + 0x10]
mov dword [esp + 0x2c], eax
mov eax, dword [0x42a72c]
test eax, eax
mov dword [esp + 0x28], edx
jne 0x4048a5
mov eax, dword [0x42a730]
mov dword [esp + 0x10], str.getaddrinfo
test eax, eax
mov dword [esp + 0x14], 0x4049b0
mov dword [esp + 0x18], str.getnameinfo
mov dword [esp + 0x1c], 0x4050b0
mov dword [esp + 0x20], str.freeaddrinfo
mov dword [esp + 0x24], 0x404960
je 0x40472d
mov eax, dword [0x41fcb4]
jmp 0x4048a0
lea ecx, [esp + 0x164]
push 0x104
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x40488d
lea edi, [esp + 0x164]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x58]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x58]
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 ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
mov ebx, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
and ecx, 3
lea eax, [esp + 0x58]
rep movsb byte es:[edi], byte [esi]
push eax
call ebx
mov esi, eax
test esi, esi
je 0x4047cc
push str.getaddrinfo
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x404848
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea edi, [esp + 0x164]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x58]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x58]
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 + 0x58]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call ebx
mov esi, eax
test esi, esi
je 0x40488d
push str.getaddrinfo
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x404848
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x40488d
mov ecx, dword [0x41d258]
xor ebx, ebx
test ecx, ecx
jle 0x404877
lea edi, [esp + 0x14]
mov ecx, dword [edi - 4]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
mov dword [edi], eax
je 0x40483f
mov ecx, dword [0x41d258]
inc ebx
add edi, 8
cmp ebx, ecx
jl 0x404858
xor eax, eax
test ecx, ecx
jle 0x40488d
mov edx, dword [esp + eax*8 + 0x14]
mov dword [eax*8 + 0x41fcac], edx
inc eax
cmp eax, ecx
jl 0x40487d
mov eax, dword [0x41fcb4]
mov edi, dword [esp + 0x30]
mov dword [0x42a730], 1
mov dword [0x42a72c], eax
mov edx, dword [esp + 0x28]
push 2
push 0
push 0
lea ecx, [esp + 0x278]
push 0x401
push ecx
mov ecx, dword [esp + 0x40]
push edx
push ecx
call eax
mov esi, eax
push esi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
test esi, esi
je 0x404904
mov edx, dword [str.Unknown_Name]
mov eax, dword [0x41fc9c]
mov ecx, dword [0x41fca0]
mov dword [esp + 0x26c], edx
mov dl, byte [0x41fca4]
mov dword [esp + 0x270], eax
mov dword [esp + 0x274], ecx
mov byte [esp + 0x278], dl
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
mov ebp, dword [ebp + 0x1c]
test ebp, ebp
jne 0x404690
call dword [sym.imp.WS2_32.dll_WSACleanup]
pop edi
pop esi
pop ebp
mov eax, 0xfffffff7
pop ebx
add esp, 0x7f0
ret
test ebp, ebp
jne 0x404946
call dword [sym.imp.WS2_32.dll_WSACleanup]
pop edi
pop esi
pop ebp
mov eax, 0xfffffff7
pop ebx
add esp, 0x7f0
ret
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x7f0
ret