Function at 0x4032bc
Capabilities:
Connect socket
Get socket status
Initialize winsock library
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x424
mov eax, dword [ebp + 0xc]
mov word [ebp - 0x3fc], ax
mov dword [ebp - 0x24], 0
mov dword [ebp - 0xc], 0xffffffff
mov dword [ebp - 0x3f0], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x3f4], 1
mov dword [ebp - 0x20], 0
cmp dword [ebp + 8], 0
je 0x40384f
cmp word [ebp - 0x3fc], 0
je 0x40384f
mov eax, dword [ebp + 8]
movzx eax, word [eax]
test ax, ax
je 0x403852
lea eax, [ebp - 0x1bc]
mov dword [esp + 4], eax
mov dword [esp], 0x202
mov eax, dword [sym.imp.WS2_32.dll_WSAStartup]
call eax
sub esp, 8
test eax, eax
jne 0x403855
mov dword [esp + 4], 0xc
mov dword [esp], 0
call fcn.00401de8
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x403858
movzx ebx, word [ebp - 0x3fc]
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call fcn.00401ee9
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0x409130
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call fcn.004065d0
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
js 0x40385b
mov dword [esp + 4], 0x20
lea eax, [ebp - 0x1dc]
mov dword [esp], eax
call fcn.004042e0
sub esp, 8
mov dword [ebp - 0x1d8], 0
mov dword [ebp - 0x1d4], 1
mov dword [ebp - 0x1d0], 6
lea eax, [ebp - 0x3f0]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x1dc]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x14]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_GetAddrInfoW]
call eax
sub esp, 0x10
test eax, eax
jne 0x40385e
mov eax, dword [ebp - 0x3f0]
mov ecx, dword [eax + 0xc]
mov eax, dword [ebp - 0x3f0]
mov edx, dword [eax + 8]
mov eax, dword [ebp - 0x3f0]
mov eax, dword [eax + 4]
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_socket]
call eax
sub esp, 0xc
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
je 0x403861
mov dword [esp + 0x10], 4
lea eax, [ebp + 0x10]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x1006
mov dword [esp + 4], 0xffff
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_setsockopt]
call eax
sub esp, 0x14
cmp eax, 0xffffffff
je 0x403864
lea eax, [ebp - 0x3f4]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x8004667e
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_ioctlsocket]
call eax
sub esp, 0xc
cmp eax, 0xffffffff
je 0x403867
mov eax, dword [ebp - 0x3f0]
mov eax, dword [eax + 0x10]
mov edx, eax
mov eax, dword [ebp - 0x3f0]
mov eax, dword [eax + 0x18]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_connect]
call eax
sub esp, 0xc
cmp eax, 0xffffffff
jne 0x403515
mov eax, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call eax
cmp eax, 0x2733
jne 0x40386a
mov dword [ebp - 0x3f4], 0
lea eax, [ebp - 0x3f4]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x8004667e
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_ioctlsocket]
call eax
sub esp, 0xc
cmp eax, 0xffffffff
je 0x40386d
mov dword [ebp - 0x2e0], 0
mov dword [ebp - 0x3e4], 0
mov eax, dword [ebp - 0x2e0]
cmp eax, 0x3f
ja 0x403582
mov eax, dword [ebp - 0x2e0]
lea edx, [eax + 1]
mov dword [ebp - 0x2e0], edx
mov edx, dword [ebp - 0xc]
mov dword [ebp + eax*4 - 0x2dc], edx
mov eax, dword [ebp - 0x3e4]
cmp eax, 0x3f
ja 0x4035a6
mov eax, dword [ebp - 0x3e4]
lea edx, [eax + 1]
mov dword [ebp - 0x3e4], edx
mov edx, dword [ebp - 0xc]
mov dword [ebp + eax*4 - 0x3e0], edx
mov dword [esp + 4], 8
lea eax, [ebp - 0x3ec]
mov dword [esp], eax
call fcn.004042e0
sub esp, 8
mov dword [ebp - 0x3ec], 5
mov dword [ebp - 0x3e8], 0
lea eax, [ebp - 0x3ec]
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x3e4]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x2e0]
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], 0
mov eax, dword [sym.imp.WS2_32.dll_select]
call eax
sub esp, 0x14
cmp eax, 0xffffffff
je 0x403870
lea eax, [ebp - 0x2e0]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.WS2_32.dll___WSAFDIsSet
sub esp, 8
test eax, eax
jne 0x40365b
cmp dword [ebp + 0x14], 0
jne 0x403873
cmp dword [ebp + 0x18], 0
jne 0x403873
cmp dword [ebp + 0x1c], 0
je 0x403873
mov eax, dword [ebp + 0x1c]
mov dword [eax], 1
jmp 0x403883
cmp dword [ebp + 0x14], 0
jne 0x40367b
cmp dword [ebp + 0x18], 0
jne 0x40367b
cmp dword [ebp + 0x1c], 0
je 0x40367b
mov eax, dword [ebp + 0x1c]
mov dword [eax], 2
jmp 0x403883
mov eax, dword [ebp + 0x18]
sub eax, dword [ebp - 0x18]
mov ecx, eax
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp - 0x18]
add eax, edx
mov dword [esp + 0xc], 0
mov dword [esp + 8], ecx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_send]
call eax
sub esp, 0x10
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0xffffffff
je 0x403876
mov eax, dword [ebp - 0x28]
add dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp + 0x18]
jb 0x40367b
cmp dword [ebp + 0x1c], 0
je 0x4036dc
mov eax, dword [ebp + 0x1c]
mov eax, dword [eax]
test eax, eax
je 0x4036dc
mov dword [ebp - 0x20], 1
cmp dword [ebp - 0x20], 0
je 0x4036e9
mov eax, dword [ebp + 0x1c]
mov eax, dword [eax]
jmp 0x4036ee
mov eax, 0x400
mov dword [esp + 4], eax
mov dword [esp], 0
call fcn.00401de8
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x403879
cmp dword [ebp - 0x20], 0
je 0x403723
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call fcn.00401ee9
sub eax, dword [ebp - 0x1c]
mov ecx, eax
jmp 0x403728
mov ecx, 0x400
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x1c]
add eax, edx
mov dword [esp + 0xc], 0
mov dword [esp + 8], ecx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_recv]
call eax
sub esp, 0x10
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
jle 0x4037b7
mov eax, dword [ebp - 0x2c]
add dword [ebp - 0x1c], eax
cmp dword [ebp - 0x20], 0
je 0x403774
mov eax, dword [ebp + 0x1c]
mov eax, dword [eax]
cmp dword [ebp - 0x1c], eax
jb 0x40370b
jmp 0x4037fc
mov eax, dword [ebp - 0x1c]
add eax, 0x400
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call fcn.00401de8
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x40370b
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call fcn.00401e9b
test eax, eax
je 0x40387c
mov dword [ebp - 0x10], 0
jmp 0x40387c
cmp dword [ebp - 0x2c], 0
jne 0x4037c3
cmp dword [ebp - 0x1c], 0
jne 0x4037fc
cmp dword [ebp - 0x2c], 0xffffffff
jne 0x4037dd
mov eax, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call eax
cmp eax, 0x274c
jne 0x4037dd
cmp dword [ebp - 0x1c], 0
jne 0x4037fc
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call fcn.00401e9b
test eax, eax
je 0x40387f
mov dword [ebp - 0x10], 0
jmp 0x40387f
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call fcn.00401ee9
cmp dword [ebp - 0x1c], eax
je 0x40383f
mov eax, dword [ebp - 0x1c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call fcn.00401de8
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x40383f
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call fcn.00401e9b
test eax, eax
je 0x403882
mov dword [ebp - 0x10], 0
jmp 0x403882
cmp dword [ebp + 0x1c], 0
je 0x40384f
mov eax, dword [ebp + 0x1c]
mov edx, dword [ebp - 0x1c]
mov dword [eax], edx
jmp 0x403883
nop
jmp 0x403883
nop
jmp 0x403883
nop
jmp 0x403883
nop
jmp 0x403883
nop
jmp 0x403883
nop
jmp 0x403883
nop
jmp 0x403883
nop
jmp 0x403883
nop
jmp 0x403883
nop
jmp 0x403883
nop
jmp 0x403883
nop
jmp 0x403883
nop
jmp 0x403883
nop
jmp 0x403883
nop
jmp 0x403883
nop
jmp 0x403883
nop
jmp 0x403883
nop
cmp dword [ebp - 0x14], 0
je 0x403894
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call fcn.00401e9b
mov eax, dword [ebp - 0x3f0]
test eax, eax
je 0x4038b1
mov eax, dword [ebp - 0x3f0]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_FreeAddrInfoW]
call eax
sub esp, 4
cmp dword [ebp - 0xc], 0xffffffff
je 0x4038df
mov dword [esp + 4], 2
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_shutdown]
call eax
sub esp, 8
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_closesocket]
call eax
sub esp, 4
mov eax, dword [ebp - 0x10]
mov ebx, dword [ebp - 4]
leave
ret