Function at 0x4084c0
Capabilities:
Get local ipv4 addresses
Get socket information
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
mov esi, ecx
mov eax, dword [esi + 0x24]
test al, 8
jne 0x408863
and eax, 0xffffc00f
or eax, 8
mov dword [esi + 0x24], eax
mov eax, dword [0x44f620]
inc eax
mov dword [0x44f620], eax
mov eax, dword [0x44f620]
push edi
mov edi, dword [esi]
mov dword [esi + 0x2c], eax
mov dword [esi + 0x28], 0
mov dword [esi + 0x34], 0
mov dword [esi + 0x3c], 0
mov dword [esi + 0x38], 0
mov eax, dword [edi + 0x20]
mov ecx, dword [edi + 0x24]
and dword [esi + 0x24], 0xffffbfff
mov dword [esi + 0x50], eax
mov dword [esi + 0x54], ecx
mov dword [esi + 0x48], eax
mov dword [esi + 0x4c], ecx
cmp dword [edi + 0xc0], 0
jne 0x408573
push ebx
mov dword [edi + 0xc0], 0x2000
lock inc dword [0x44f628]
push 0x2000
call fcn.0042ffac
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x408868
push 0x2000
push 0
push ebx
call fcn.0042a750
add esp, 0xc
mov dword [edi + 0xbc], ebx
pop ebx
mov eax, dword [edi + 0xbc]
mov dword [esi + 0x58], eax
mov eax, dword [edi + 0xc0]
and dword [esi + 0x24], 0xffff7fff
mov dword [esi + 0x5c], eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
mov dword [esi + 0x64], 0
push eax
push 0x1008
push 0xffff
push dword [esi + 0x30]
mov dword [esi + 0x60], 0
mov dword [esi + 0x68], 0
mov dword [esi + 0x6c], 0
mov dword [esi + 0x70], 0x2000000
mov dword [esi + 0x74], 0
mov dword [esi + 0xa0], 0
mov dword [esi + 0xa4], 0x2000000
mov dword [esi + 0xa8], 0
mov dword [esi + 0xac], 0
mov dword [esi + 0xb0], 0
mov dword [esi + 0xb4], 0
mov dword [esi + 0xb8], 0
mov dword [esi + 0xbc], 0
mov dword [esi + 0xd8], 0
mov dword [esi + 0xc0], 0
mov dword [esi + 0xdc], 0
mov dword [esi + 0xc4], 0
mov dword [esi + 0xe0], 0
mov dword [esi + 0xc8], 0
mov dword [esi + 0xe4], 0
mov dword [esi + 0xcc], 0
mov dword [esi + 0xe8], 0
mov dword [esi + 0xd0], 0
mov dword [esi + 0xd4], 0
mov dword [esi + 0xec], 0
mov dword [esi + 0xf0], 0
mov dword [esi + 0xf4], 0
mov dword [esi + 0xf8], 0
mov dword [esi + 0xfc], 0
mov dword [esi + 0x100], 0
mov dword [esi + 0x104], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0xc], 4
call dword [sym.imp.WS2_32.dll_getsockopt]
pop edi
test eax, eax
jne 0x408732
mov eax, dword [ebp - 8]
sub eax, 1
je 0x408724
sub eax, 1
je 0x408716
sub eax, 1
je 0x408708
mov dword [esi + 0x28], 0xfffff00
mov eax, 0xfffff00
jmp 0x408787
mov dword [esi + 0x28], 0x100
mov eax, 0x100
jmp 0x408787
mov dword [esi + 0x28], 0x1000
mov eax, 0x1000
jmp 0x408787
mov dword [esi + 0x28], 0x100000
mov eax, 0x100000
jmp 0x408787
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2736
jne 0x4087a5
mov eax, dword [esi + 0x30]
sub eax, 0
je 0x40877b
sub eax, 1
je 0x40876d
sub eax, 1
je 0x40875f
mov dword [esi + 0x28], 0x10
mov eax, 0x10
jmp 0x408787
mov dword [esi + 0x28], 4
mov eax, 4
jmp 0x408787
mov dword [esi + 0x28], 2
mov eax, 2
jmp 0x408787
mov dword [esi + 0x28], 1
mov eax, 1
test eax, 0xfffff00
je 0x408863
mov ecx, dword [esi + 0x30]
test eax, 0xfff00
je 0x4087af
mov dword [ebp - 0xc], 0
jmp 0x4087b6
mov ecx, dword [esi + 0x30]
mov dword [esi + 0x28], 0x100000
mov dword [ebp - 0xc], 1
lea eax, [ebp - 0xc]
push eax
push 0x8004667e
push ecx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov eax, dword [esi + 0x40]
test eax, eax
jne 0x4087fb
lock inc dword [0x44f628]
push 0x1c
call fcn.0042ffac
add esp, 4
test eax, eax
je 0x408868
xorps xmm0, xmm0
movups xmmword [eax], xmm0
movq qword [eax + 0x10], xmm0
mov dword [eax + 0x18], 0
mov dword [esi + 0x40], eax
cmp dword [esi + 0x44], 0
jne 0x40882e
lock inc dword [0x44f628]
push 0x1c
call fcn.0042ffac
add esp, 4
test eax, eax
je 0x408868
xorps xmm0, xmm0
movups xmmword [eax], xmm0
movq qword [eax + 0x10], xmm0
mov dword [eax + 0x18], 0
mov dword [esi + 0x44], eax
mov eax, dword [esi + 0x40]
lea ecx, [ebp - 4]
mov dword [ebp - 4], 0x1c
push ecx
push eax
push dword [esi + 0x30]
call dword [sym.imp.WS2_32.dll_getsockname]
test dword [esi + 0x28], 0xff00000
je 0x408863
lea eax, [ebp - 4]
mov dword [ebp - 4], 0x1c
push eax
push dword [esi + 0x44]
push dword [esi + 0x30]
call dword [sym.imp.WS2_32.dll_getpeername]
pop esi
mov esp, ebp
pop ebp
ret
push str.malloc_failed__n
push 2
call fcn.0042c7ca
add esp, 4
push eax
call fcn.00408c80
add esp, 8
push 0xffffffffffffffff
call fcn.004319c5
int3