Function at 0x45d58a
Capabilities:
Connect socket
Get socket status
Resolve dns
Set socket configuration

Disassembly:
sub esp, 0x288
push ebx
push edi
xor edi, edi
mov ebx, edi
cmp dword [esp + 0x294], ebx
je 0x45d937
mov eax, dword [esp + 0x29c]
push esi
push 2
pop edx
push 0x17
pop ecx
test eax, 0x10000000
je 0x45d5cc
mov esi, ecx
and eax, 0xefffffff
mov dword [esp + 0x10], esi
mov dword [esp + 0x2a0], eax
jmp 0x45d5d2
mov esi, edx
mov dword [esp + 0x10], edx
test eax, eax
jne 0x45d5de
inc eax
mov dword [esp + 0x2a0], eax
push ebp
push edi
push eax
push esi
call dword [sym.imp.WS2_32.dll_socket]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x45d935
push dword [esp + 0x29c]
call fcn.00502b30
push 0x17
pop edx
mov dword [esp + 0x18], eax
cmp esi, edx
jne 0x45d66b
cmp dword [0x9d830c], ebx
je 0x45d921
lea ecx, [esp + 0x54]
push ecx
push eax
push edx
call fcn.0045d50c
add esp, 0xc
test eax, eax
jg 0x45d665
lea eax, [esp + 0x1c]
push eax
push edi
push edi
push dword [esp + 0x24]
call dword [0x9d8314]
test eax, eax
jne 0x45d921
mov eax, dword [esp + 0x1c]
lea edi, [esp + 0x54]
push eax
mov esi, dword [eax + 0x18]
add esi, 8
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call dword [0x9d8318]
mov edi, dword [esp + 0x1c]
mov esi, dword [esp + 0x14]
jmp 0x45d69e
mov edi, dword [esp + 0x1c]
jmp 0x45d69e
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
mov edi, eax
cmp edi, 0xffffffff
jne 0x45d68e
push dword [esp + 0x18]
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x45d68e
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov edi, dword [eax]
xor eax, eax
cmp edi, 0xffffffff
setne al
test eax, eax
je 0x45d921
xor ecx, ecx
cmp dword [esp + 0x2b0], ebx
jne 0x45d6b9
mov eax, dword [esp + 0x2ac]
test eax, eax
je 0x45d708
cmp word [eax], cx
je 0x45d708
push 0x1c
push ecx
lea eax, [esp + 0x7c]
push eax
call sub.MSVCRT.dll_memset
push 0x10
lea eax, [esp + 0x74]
push 0
push eax
call sub.MSVCRT.dll_memset
add esp, 0x18
lea eax, [esp + 0x74]
push dword [esp + 0x2b0]
push dword [esp + 0x2b0]
push eax
lea eax, [esp + 0x70]
push eax
xor eax, eax
cmp esi, 0x17
push ebp
sete al
push eax
call fcn.0045dbb4
test eax, eax
je 0x45d921
xor ecx, ecx
cmp esi, 0x17
jne 0x45d748
push 0x1c
push ecx
lea eax, [esp + 0x40]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push esi
pop eax
push dword [esp + 0x2a0]
mov word [esp + 0x3c], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x3a], ax
lea esi, [esp + 0x54]
lea edi, [esp + 0x40]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x14]
jmp 0x45d776
push 0x10
push ecx
lea eax, [esp + 0x28]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push 2
pop eax
push dword [esp + 0x2a0]
mov word [esp + 0x24], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x22], ax
mov dword [esp + 0x24], edi
xor eax, eax
inc eax
cmp dword [esp + 0x2a4], eax
jne 0x45d8c0
mov edi, dword [esp + 0x2a8]
test edi, edi
jle 0x45d86a
mov dword [esp + 0x10], eax
lea eax, [esp + 0x10]
push eax
push 0x8004667e
push ebp
call dword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
jne 0x45d921
push 0x17
pop eax
cmp esi, eax
jne 0x45d7c1
push 0x1c
lea eax, [esp + 0x3c]
jmp 0x45d7c7
push 0x10
lea eax, [esp + 0x24]
push eax
push ebp
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x45d921
xor eax, eax
mov dword [esp + 0x94], ebp
inc eax
mov dword [esp + 0x198], ebp
mov dword [esp + 0x90], eax
mov ecx, 0x3e8
mov dword [esp + 0x194], eax
xor esi, esi
mov eax, edi
cdq
idiv ecx
mov dword [esp + 0x30], eax
imul eax, eax, 0x3e8
sub edi, eax
imul eax, edi, 0x3e8
mov dword [esp + 0x34], eax
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x198]
push eax
lea eax, [esp + 0x98]
push eax
push esi
lea eax, [ebp + 1]
push eax
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 1
jne 0x45d853
lea eax, [esp + 0x90]
push eax
push ebp
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x45d853
xor ebx, ebx
inc ebx
lea eax, [esp + 0x10]
mov dword [esp + 0x10], esi
push eax
push 0x8004667e
push ebp
call dword [sym.imp.WS2_32.dll_ioctlsocket]
jmp 0x45d895
push 0x17
pop eax
cmp esi, eax
jne 0x45d879
push 0x1c
lea eax, [esp + 0x3c]
jmp 0x45d87f
push 0x10
lea eax, [esp + 0x24]
push eax
push ebp
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x45d921
xor ebx, ebx
inc ebx
xor esi, esi
test ebx, ebx
je 0x45d921
push 0x10
push esi
push dword [0x9d78b4]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x45d921
mov dword [ebx], 1
mov dword [ebx + 8], ebp
mov dword [ebx + 0xc], esi
jmp 0x45d921
mov dword [esp + 0x10], eax
lea eax, [esp + 0x10]
push eax
push 0x8004667e
push ebp
call dword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
jne 0x45d921
push 0x38
push eax
push dword [0x9d78b4]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x45d921
push 2
pop eax
push 0x17
mov dword [ebx], eax
lea edi, [ebx + 4]
pop eax
cmp esi, eax
jne 0x45d908
push 7
pop ecx
lea esi, [esp + 0x38]
rep movsd dword es:[edi], dword [esi]
jmp 0x45d910
lea esi, [esp + 0x20]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
cmp dword [esp + 0x14], eax
mov dword [ebx + 0x28], ebp
sete al
and dword [ebx + 0x24], 0
mov byte [ebx + 0x20], al
push dword [esp + 0x18]
call fcn.00502b20
test ebx, ebx
jne 0x45d935
push ebp
call dword [sym.imp.WS2_32.dll_closesocket]
pop ebp
pop esi
pop edi
mov eax, ebx
pop ebx
add esp, 0x288
ret 0x18