Function at 0x419500
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration

Disassembly:
push ebp
lea ebp, [esp - 0x498]
sub esp, 0x538
mov eax, dword [0x4915c0]
xor eax, ebp
mov dword [ebp + 0x494], eax
mov eax, dword [ebp + 0x4a0]
push ebx
mov ebx, dword [0x4962c8]
push esi
push edi
mov dword [ebp + 0x78], eax
mov dword [ebp + 0x70], ebx
call dword [0x49297c]
push 0
push 1
push 2
mov dword [ebp + 0x80], eax
mov dword [ebp + 0x74], 0
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
je 0x419652
movzx ecx, word [ebx + 0x4b8]
xor eax, eax
mov dword [ebp + 0x84], eax
push ecx
mov dword [ebp + 0x88], eax
mov dword [ebp + 0x8c], eax
mov dword [ebp + 0x90], eax
mov word [ebp + 0x84], 2
call dword [sym.imp.WS2_32.dll_htons]
mov edi, dword [ebx + 0x74]
test edi, edi
mov word [ebp + 0x86], ax
jne 0x41959d
xor eax, eax
jmp 0x4195d0
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 1
cmp eax, 0x3fffffff
jle 0x4195b2
xor eax, eax
jmp 0x4195d0
lea ebx, [eax + eax]
mov eax, ebx
call fcn.0045a170
mov edx, dword [ebp + 0x80]
mov eax, esp
push edx
push ebx
push edi
push eax
call fcn.00403150
mov ebx, dword [ebp + 0x70]
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
mov edi, dword [sym.imp.WS2_32.dll_ioctlsocket]
mov dword [ebp + 0x88], eax
lea eax, [ebp + 0x7c]
push eax
push 0x8004667e
push esi
mov dword [ebp + 0x7c], 1
call edi
push 0x10
lea ecx, [ebp + 0x84]
push ecx
push esi
mov dword [ebp + 0x64], 0x14
mov dword [ebp + 0x68], 0
call dword [sym.imp.WS2_32.dll_connect]
lea edx, [ebp + 0x64]
push edx
push 0
lea eax, [ebp - 0xa0]
push eax
push 0
push esi
mov dword [ebp - 0x9c], esi
mov dword [ebp - 0xa0], 1
call dword [sym.imp.WS2_32.dll_select]
lea ecx, [ebp - 0xa0]
push ecx
push esi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x41965a
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
jmp 0x41979a
lea edx, [ebp + 0x7c]
push edx
push 0x8004667e
push esi
mov dword [ebp + 0x7c], 0
call edi
push 4
lea eax, [ebp + 0x6c]
push eax
push 0x1006
push 0xffff
push esi
mov dword [ebp + 0x6c], 0x4e20
call dword [sym.imp.WS2_32.dll_setsockopt]
mov ebx, dword [ebx + 0xbc]
test ebx, ebx
je 0x41969e
push ebx
call fcn.00439979
add esp, 4
mov ecx, dword [ebp + 0x78]
mov ebx, dword [ecx]
test ebx, ebx
je 0x4196ee
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 1
cmp eax, 0x3fffffff
jg 0x4196ee
add eax, eax
mov dword [ebp + 0x78], eax
call fcn.0045a170
mov edi, esp
test edi, edi
je 0x4196ee
mov edx, dword [ebp + 0x78]
mov eax, dword [ebp + 0x80]
push 0
push 0
push edx
push edi
push 0xffffffffffffffff
push ebx
push 0
push eax
mov byte [edi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
neg eax
sbb eax, eax
and eax, edi
jmp 0x4196f0
xor eax, eax
mov ecx, eax
lea edi, [ecx + 1]
mov dl, byte [ecx]
add ecx, 1
test dl, dl
jne 0x4196f5
push 0
sub ecx, edi
push ecx
push eax
push esi
call dword [sym.imp.WS2_32.dll_send]
push 0xc350
call fcn.0043997e
add esp, 4
mov dword [ebp + 0x80], eax
xor ebx, ebx
push 0x400
lea ecx, [ebp + 0x94]
push 0
push ecx
call fcn.00457910
add esp, 0xc
push 0
push 0x3ff
lea edx, [ebp + 0x94]
push edx
push esi
call dword [sym.imp.WS2_32.dll_recv]
mov edi, eax
test edi, edi
jle 0x41976f
mov ecx, dword [ebp + 0x80]
push edi
lea eax, [ebp + 0x94]
push eax
lea edx, [ebx + ecx]
push edx
call fcn.0045dc40
add esp, 0xc
add ebx, edi
jmp 0x419774
cmp edi, 0xffffffff
je 0x41977a
test edi, edi
jg 0x419720
jmp 0x419781
mov dword [ebp + 0x74], 0xffffffff
mov eax, dword [ebp + 0x70]
mov ecx, dword [ebp + 0x80]
push esi
mov dword [eax + 0xbc], ecx
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [ebp + 0x74]
lea esp, [ebp - 0xac]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x494]
xor ecx, ebp
call fcn.00455843
add ebp, 0x498
mov esp, ebp
pop ebp
ret 4