Function at 0x4050b0
Capabilities:
Create tcp socket
Create udp socket
Get local ipv4 addresses
Get socket information
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42895d
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x4360e4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x40], ecx
push 1
push 0
push 0
push 6
push 1
push 2
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0x436998
call dword [sym.imp.WS2_32.dll_WSASocketW]
mov edi, eax
lea ecx, [ebp - 0x18]
cmp edi, 0xffffffff
sete dl
call fcn.004043e0
or eax, 0xffffffff
cmp edi, eax
cmove edi, eax
mov dword [ebp - 0x44], edi
mov dword [ebp - 4], 0
cmp edi, eax
jne 0x40518b
cmp dword [ebp - 0x18], 0
jne 0x40555b
mov esi, dword fs:[0x2c]
mov eax, dword [0x4384c8]
mov dword [ebp - 0x1c], 1
mov ecx, dword [esi]
cmp eax, dword [ecx + 4]
jle 0x40517b
push 0x4384c8
call fcn.0040f975
add esp, 4
cmp dword [0x4384c8], 0xffffffff
jne 0x40517b
push 0x429950
call fcn.0040fdcc
add esp, 4
push 0x4384c8
call fcn.0040f92b
add esp, 4
mov dword [ebp - 0x18], 0x2719
mov dword [ebp - 0x14], 0x4369a8
jmp 0x4051ba
push 4
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], 1
push eax
push 4
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
lea ecx, [ebp - 0x18]
setne dl
call fcn.004043e0
mov esi, dword fs:[0x2c]
mov ebx, dword [sym.imp.WS2_32.dll_htonl]
xorps xmm0, xmm0
mov eax, 2
mov dword [ebp - 0x3c], 0x10
push 0x7f000001
movlpd qword [ebp - 0x2c], xmm0
mov word [ebp - 0x34], ax
call ebx
mov dword [ebp - 0x30], eax
lea edx, [ebp - 0x34]
xor eax, eax
mov ecx, edi
mov word [ebp - 0x32], ax
lea eax, [ebp - 0x18]
push eax
push 0x10
call fcn.00404450
add esp, 8
cmp eax, 0xffffffff
jne 0x40520a
cmp dword [ebp - 0x18], 0
jne 0x40555b
cmp edi, 0xffffffff
jne 0x40525e
mov ecx, dword [esi]
mov eax, dword [0x4384c8]
cmp eax, dword [ecx + 4]
jle 0x40524d
push 0x4384c8
call fcn.0040f975
add esp, 4
cmp dword [0x4384c8], edi
jne 0x40524d
push 0x429950
call fcn.0040fdcc
add esp, 4
push 0x4384c8
call fcn.0040f92b
add esp, 4
mov eax, 0x2719
mov dword [ebp - 0x14], 0x4369a8
mov dword [ebp - 0x18], eax
jmp 0x405291
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], 0x10
push eax
lea eax, [ebp - 0x34]
push eax
push edi
call dword [sym.imp.WS2_32.dll_getsockname]
mov esi, eax
lea ecx, [ebp - 0x18]
mov eax, dword [ebp - 0x20]
test esi, esi
mov dword [ebp - 0x3c], eax
setne dl
call fcn.004043e0
cmp esi, 0xffffffff
jne 0x405299
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x40555b
push 0
call ebx
cmp dword [ebp - 0x30], eax
jne 0x4052ac
push 0x7f000001
call ebx
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x18]
mov ecx, edi
push eax
call fcn.004048f0
add esp, 4
cmp eax, 0xffffffff
jne 0x4052c9
cmp dword [ebp - 0x18], 0
jne 0x40555b
push 1
push 0
push 0
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_WSASocketW]
mov ebx, eax
lea ecx, [ebp - 0x18]
cmp ebx, 0xffffffff
sete dl
call fcn.004043e0
cmp ebx, 0xffffffff
mov eax, 0xffffffff
cmove ebx, eax
mov dword [ebp - 0x20], ebx
mov byte [ebp - 4], 1
cmp ebx, eax
jne 0x40530b
cmp dword [ebp - 0x18], 0
jne 0x405568
lea eax, [ebp - 0x18]
mov ecx, ebx
push eax
push dword [ebp - 0x3c]
lea edx, [ebp - 0x34]
call fcn.00404680
add esp, 8
cmp eax, 0xffffffff
jne 0x40532e
cmp dword [ebp - 0x18], 0
jne 0x405568
cmp edi, 0xffffffff
jne 0x40538a
mov edi, dword fs:[0x2c]
mov eax, dword [0x4384c8]
mov ecx, dword [edi]
cmp eax, dword [ecx + 4]
jle 0x405379
push 0x4384c8
call fcn.0040f975
add esp, 4
cmp dword [0x4384c8], 0xffffffff
jne 0x405379
push 0x429950
call fcn.0040fdcc
add esp, 4
push 0x4384c8
call fcn.0040f92b
add esp, 4
mov eax, 0x2719
mov dword [ebp - 0x14], 0x4369a8
or esi, 0xffffffff
jmp 0x4053ba
push 0
push 0
push edi
call dword [sym.imp.WS2_32.dll_accept]
mov esi, eax
lea ecx, [ebp - 0x18]
cmp esi, 0xffffffff
sete dl
call fcn.004043e0
mov edi, dword fs:[0x2c]
cmp esi, 0xffffffff
jne 0x4053b8
mov eax, dword [ebp - 0x18]
or esi, esi
jmp 0x4053bd
xor eax, eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x3c], esi
mov byte [ebp - 4], 2
cmp esi, 0xffffffff
jne 0x4053d1
test eax, eax
jne 0x405575
lea eax, [ebp - 0x18]
mov dword [ebp - 0x24], 1
push eax
lea eax, [ebp - 0x24]
mov byte [ebp - 0x35], 0
push eax
push ecx
lea edx, [ebp - 0x35]
mov ecx, ebx
call fcn.00404d20
add esp, 0xc
test eax, eax
je 0x405400
cmp dword [ebp - 0x18], 0
jne 0x405575
mov dword [ebp - 0x1c], 1
cmp ebx, 0xffffffff
jne 0x40545a
mov ecx, dword [edi]
mov eax, dword [0x4384c8]
cmp eax, dword [ecx + 4]
jle 0x40544a
push 0x4384c8
call fcn.0040f975
add esp, 4
cmp dword [0x4384c8], ebx
jne 0x40544a
push 0x429950
call fcn.0040fdcc
add esp, 4
push 0x4384c8
call fcn.0040f92b
add esp, 4
mov dword [ebp - 0x18], 0x2719
mov dword [ebp - 0x14], 0x4369a8
jmp 0x405478
push 4
lea eax, [ebp - 0x1c]
push eax
push 1
push 6
push ebx
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
lea ecx, [ebp - 0x18]
setne dl
call fcn.004043e0
lea eax, [ebp - 0x18]
mov dword [ebp - 0x24], 1
push eax
lea eax, [ebp - 0x24]
mov byte [ebp - 0x35], 0
push eax
push ecx
lea edx, [ebp - 0x35]
mov ecx, esi
call fcn.00404d20
add esp, 0xc
test eax, eax
je 0x4054a7
cmp dword [ebp - 0x18], 0
jne 0x405575
mov dword [ebp - 0x1c], 1
cmp esi, 0xffffffff
jne 0x4054f3
mov ecx, dword [edi]
mov eax, dword [0x4384c8]
cmp eax, dword [ecx + 4]
jle 0x405511
push 0x4384c8
call fcn.0040f975
add esp, 4
cmp dword [0x4384c8], esi
jne 0x405511
push 0x429950
call fcn.0040fdcc
add esp, 4
push 0x4384c8
call fcn.0040f92b
add esp, 4
jmp 0x405511
push 4
lea eax, [ebp - 0x1c]
push eax
push 1
push 6
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
lea ecx, [ebp - 0x18]
setne dl
call fcn.004043e0
mov eax, dword [ebp - 0x40]
lea ecx, [ebp - 0x3c]
mov dword [ebp - 0x3c], 0xffffffff
mov dword [ebp - 0x20], 0xffffffff
mov dword [eax], esi
mov dword [eax + 4], ebx
call fcn.00405050
lea ecx, [ebp - 0x20]
call fcn.00405050
lea ecx, [ebp - 0x44]
call fcn.00405050
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040f853
mov esp, ebp
pop ebp
ret
mov edx, str.socket_select_interrupter
lea ecx, [ebp - 0x18]
call fcn.00402270
mov edx, str.socket_select_interrupter
lea ecx, [ebp - 0x18]
call fcn.00402270
mov edx, str.socket_select_interrupter
lea ecx, [ebp - 0x18]
call fcn.00402270
int3