Function at 0x4aa2e0
Capabilities:
Get local ipv4 addresses
Get socket information
Set socket configuration
Terminate process

Disassembly:
sub esp, 0x38
mov eax, dword [0x6019e4]
xor eax, esp
mov dword [esp + 0x34], eax
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x50]
mov ebp, ecx
mov dword [esp + 0x1c], 1
mov dword [esp + 0x18], 0
mov dword [esp + 0x20], 0x1c
cmp word [edi], 1
je 0x4aa3be
lea eax, [esp + 0x14]
mov edx, 4
push eax
lea eax, [esp + 0x14]
push eax
lea ecx, [edx + 0x58]
call fcn.004aeee0
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
push 0x28
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], str.ILibAsyncServerSocket
mov dword [esi], 0x4a9e50
mov dword [esi + 4], 0x4a9ec0
mov dword [esi + 8], 0x4aa0a0
mov dword [esi + 0xc], ebp
mov dword [esi + 0x38], 0x487e70
mov dword [esi + 0x3c], 0x488320
mov dword [esi + 0x40], fcn.00403f00
mov dword [esi + 0x44], 0x4883d0
mov dword [esi + 0x34], 0x488360
mov dword [esi + 0x18], 0xa
call fcn.0058db11
add esp, 0xc
mov dword [esi + 0x1c], eax
test eax, eax
jne 0x4aa3d3
push esi
call fcn.0058c812
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0xfd
push 0x287
mov edx, 0x623534
xor ecx, ecx
call fcn.004b4f80
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x34]
xor ecx, esp
call fcn.005852a8
add esp, 0x38
ret
cmp word [edi], 1
mov ebx, dword [sym.imp.WS2_32.dll_ntohs]
jne 0x4aa41c
push 0
push 1
push 1
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi + 0x24], eax
cmp eax, 0xffffffff
jne 0x4aa461
push dword [esi + 0x1c]
call fcn.0058c812
add esp, 4
push esi
call fcn.0058c812
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x34]
xor ecx, esp
call fcn.005852a8
add esp, 0x38
ret
movzx eax, word [edi + 2]
push eax
call ebx
push 6
mov word [esi + 0x28], ax
mov word [esi + 0x2a], ax
movzx eax, word [edi]
push 1
push eax
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi + 0x24], eax
cmp eax, 0xffffffff
je 0x4aa3f3
cmp word [edi], 0x17
jne 0x4aa461
push 4
lea ecx, [esp + 0x1c]
push ecx
push 0x1b
push 0x29
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jne 0x4aa592
push 4
lea eax, [esp + 0x20]
push eax
push 0xfffffffffffffffb
push 0xffff
push dword [esi + 0x24]
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jne 0x4aa5b9
cmp word [edi], 0x17
mov ecx, 0x1c
mov eax, 0x10
cmove eax, ecx
push eax
push edi
push dword [esi + 0x24]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x4aa4d2
push dword [esi + 0x24]
call dword [sym.imp.WS2_32.dll_closesocket]
push dword [esi + 0x1c]
call fcn.0058c812
add esp, 4
push esi
call fcn.0058c812
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x34]
xor ecx, esp
call fcn.005852a8
add esp, 0x38
ret
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x2c]
push eax
push dword [esi + 0x24]
call dword [sym.imp.WS2_32.dll_getsockname]
cmp word [edi], 1
je 0x4aa4f5
push dword [esp + 0x2a]
call ebx
mov word [esi + 0x28], ax
xor edi, edi
nop word [eax + eax]
push 4
push 0x4aa1d0
push 0x4aa180
push 0x4aa140
push 0x4aa0d0
mov edx, 0x1000
mov ecx, ebp
call fcn.004aa700
mov ecx, dword [esi + 0x1c]
add esp, 0x14
mov dword [edi + ecx], eax
mov eax, dword [esi + 0x1c]
mov eax, dword [edi + eax]
test eax, eax
je 0x4aa53f
mov dword [eax + 0x1cc], 0x4aa1f0
add edi, 4
cmp edi, 0x28
jl 0x4aa500
lea eax, [esp + 0x24]
mov dword [esp + 0x24], 1
push eax
push 0x8004667e
push dword [esi + 0x24]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
push 4
push dword [esi + 0x24]
mov dword [esi + 0x2c], 1
call dword [sym.imp.WS2_32.dll_listen]
mov edx, esi
mov ecx, ebp
call fcn.004af570
mov ecx, dword [esp + 0x44]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.005852a8
add esp, 0x38
ret
push 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x296
mov edx, 0x62355c
xor ecx, ecx
call fcn.004b4f80
add esp, 0xc
push 0xfd
call fcn.005885bd
push 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x2a1
mov edx, str...microstackILibAsyncServerSocket.c
xor ecx, ecx
call fcn.004b4f80
add esp, 0xc
push 0xfd
call fcn.005885bd
int3