Function at 0x4049e3
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
sub eax, dword [0x4160e4]
add ecx, dword [0x4160ec]
mov ebx, ebx
sub edx, dword [0x4160e8]
sub ecx, dword [0x4160ec]
add edx, dword [0x4160e8]
inc ecx
mov edx, edx
add ebx, dword [0x4160e0]
add eax, dword [0x4160e4]
lea ebx, [ebx]
sub ebx, dword [0x4160e0]
lea ecx, [ecx]
dec ecx
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
test esi, esi
jge 0x404a76
sub eax, dword [0x4160e4]
add ecx, dword [0x4160ec]
mov ebx, ebx
sub edx, dword [0x4160e8]
sub ecx, dword [0x4160ec]
add edx, dword [0x4160e8]
inc ecx
mov edx, edx
add ebx, dword [0x4160e0]
add eax, dword [0x4160e4]
lea ebx, [ebx]
sub ebx, dword [0x4160e0]
lea ecx, [ecx]
dec ecx
jmp 0x404c95
push edi
sub eax, dword [0x4160e4]
add ecx, dword [0x4160ec]
mov ebx, ebx
sub edx, dword [0x4160e8]
sub ecx, dword [0x4160ec]
add edx, dword [0x4160e8]
inc ecx
mov edx, edx
add ebx, dword [0x4160e0]
add eax, dword [0x4160e4]
lea ebx, [ebx]
sub ebx, dword [0x4160e0]
lea ecx, [ecx]
dec ecx
push 0x10
lea eax, [ebp - 0x10]
push 0
push eax
call fcn.0040c960
add esp, 0xc
sub eax, dword [0x4160e4]
add ecx, dword [0x4160ec]
mov ebx, ebx
sub edx, dword [0x4160e8]
sub ecx, dword [0x4160ec]
add edx, dword [0x4160e8]
inc ecx
mov edx, edx
add ebx, dword [0x4160e0]
add eax, dword [0x4160e4]
lea ebx, [ebx]
sub ebx, dword [0x4160e0]
lea ecx, [ecx]
dec ecx
mov word [ebp - 0x10], 2
sub eax, dword [0x4160e4]
add ecx, dword [0x4160ec]
mov ebx, ebx
sub edx, dword [0x4160e8]
sub ecx, dword [0x4160ec]
add edx, dword [0x4160e8]
inc ecx
mov edx, edx
add ebx, dword [0x4160e0]
add eax, dword [0x4160e4]
lea ebx, [ebx]
sub ebx, dword [0x4160e0]
lea ecx, [ecx]
dec ecx
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp - 0xc], eax
sub eax, dword [0x4160e4]
add ecx, dword [0x4160ec]
mov ebx, ebx
sub edx, dword [0x4160e8]
sub ecx, dword [0x4160ec]
add edx, dword [0x4160e8]
inc ecx
mov edx, edx
add ebx, dword [0x4160e0]
add eax, dword [0x4160e4]
lea ebx, [ebx]
sub ebx, dword [0x4160e0]
lea ecx, [ecx]
dec ecx
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0xe], ax
sub eax, dword [0x4160e4]
add ecx, dword [0x4160ec]
mov ebx, ebx
sub edx, dword [0x4160e8]
sub ecx, dword [0x4160ec]
add edx, dword [0x4160e8]
inc ecx
mov edx, edx
add ebx, dword [0x4160e0]
add eax, dword [0x4160e4]
lea ebx, [ebx]
sub ebx, dword [0x4160e0]
lea ecx, [ecx]
dec ecx
lea eax, [ebp - 0x10]
push 0x10
push eax
push esi
call dword [sym.imp.WS2_32.dll_connect]
mov edi, eax
sub eax, dword [0x4160e4]
add ecx, dword [0x4160ec]
mov ebx, ebx
sub edx, dword [0x4160e8]
sub ecx, dword [0x4160ec]
add edx, dword [0x4160e8]
inc ecx
mov edx, edx
add ebx, dword [0x4160e0]
add eax, dword [0x4160e4]
lea ebx, [ebx]
sub ebx, dword [0x4160e0]
lea ecx, [ecx]
dec ecx
test edi, edi
pop edi
je 0x404c9a
sub eax, dword [0x4160e4]
add ecx, dword [0x4160ec]
mov ebx, ebx
sub edx, dword [0x4160e8]
sub ecx, dword [0x4160ec]
add edx, dword [0x4160e8]
inc ecx
mov edx, edx
add ebx, dword [0x4160e0]
add eax, dword [0x4160e4]
lea ebx, [ebx]
sub ebx, dword [0x4160e0]
lea ecx, [ecx]
dec ecx
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
sub eax, dword [0x4160e4]
add ecx, dword [0x4160ec]
mov ebx, ebx
sub edx, dword [0x4160e8]
sub ecx, dword [0x4160ec]
add edx, dword [0x4160e8]
inc ecx
mov edx, edx
add ebx, dword [0x4160e0]
add eax, dword [0x4160e4]
lea ebx, [ebx]
sub ebx, dword [0x4160e0]
lea ecx, [ecx]
dec ecx
or eax, 0xffffffff
jmp 0x404c9c
mov eax, esi
pop esi
pop ebx
leave
ret