Function at 0x10037896
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0xa24
mov al, byte [0x1009ac5b]
or dword [esp], 0xffffffff
push ebx
push ebp
push esi
mov esi, dword [esp + 0xa34]
push edi
mov ebp, dword [esi]
push 0xff
mov byte [esp + 0x134], al
xor ebx, ebx
lea eax, [esp + 0x135]
push ebx
push eax
mov dword [esp + 0x20], ebp
call fcn.1005b850
mov edi, dword [ebp + 0x95c]
mov dword [esp + 0x38], ebx
mov ecx, dword [ebp + 0x95c]
add esp, 0xc
mov dword [esp + 0x20], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x28], 1
test ecx, ecx
je 0x10037a55
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10037900
sub ecx, edx
cmp ecx, 1
jbe 0x10037a55
mov edx, edi
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x10037917
sub edx, ecx
push 0x16
pop ecx
cmp edx, ecx
jb 0x10037935
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1003792c
sub ecx, edx
lea eax, [ecx + 1]
push 1
push eax
call dword [0x1008d0a8]
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
jne 0x10037951
push 0x1b
pop eax
jmp 0x10037e3d
cmp byte [edi], 0x3a
jne 0x1003795a
mov ecx, edi
jmp 0x1003798f
push 0x3a
push edi
call fcn.1005bd70
pop ecx
pop ecx
mov ecx, eax
mov dword [esp + 0x24], ecx
test ecx, ecx
je 0x10037981
sub ecx, edi
push ecx
push edi
push ebx
call fcn.1005c650
mov ecx, dword [esp + 0x30]
add esp, 0xc
jmp 0x1003798f
mov edx, ebx
sub edx, edi
mov al, byte [edi]
mov byte [edx + edi], al
inc edi
test al, al
jne 0x10037985
test ecx, ecx
je 0x10037a03
push 0x3a
push ecx
call fcn.1005bd70
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x10037a03
push 0xa
lea ecx, [edi + 1]
push 0
push ecx
call fcn.1005c9c2
push eax
call fcn.10029330
movzx eax, ax
push 0x2d
push edi
mov dword [esp + 0x38], eax
call fcn.1005bd70
add esp, 0x18
test eax, eax
je 0x100379e9
push 0xa
inc eax
push 0
push eax
call fcn.1005c9c2
push eax
call fcn.10029330
mov ecx, dword [esp + 0x30]
add esp, 0x10
movzx eax, ax
jmp 0x100379f0
mov ecx, dword [esp + 0x20]
movzx eax, cx
mov dword [esp + 0x1c], eax
cmp cx, ax
jbe 0x10037a03
and dword [esp + 0x1c], 0
and dword [esp + 0x20], 0
cmp byte [ebx], 0
je 0x10037a4b
push 0x401
lea eax, [esp + 0x234]
push eax
mov eax, dword [esi + 0x50]
push ebx
push dword [esi + 0x8c]
push dword [eax + 0x18]
call fcn.10008640
pop ecx
push eax
mov eax, dword [esi + 0x50]
push dword [eax + 4]
call fcn.10008640
add esp, 0x18
sub eax, 0
je 0x10037a47
dec eax
je 0x10037aa3
dec eax
jne 0x10037a55
jmp 0x10037acf
mov edi, ebx
jmp 0x10037a4d
xor edi, edi
test edi, edi
jne 0x10037ad6
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x34]
push eax
push dword [esi + 0x1a8]
mov edi, 0x80
mov dword [esp + 0x24], edi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x10037aaa
push edi
lea eax, [esp + 0xb4]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.1004de15
push eax
push 0x1008ff90
push ebp
call fcn.100293e3
push ebx
call dword [0x1008d09c]
add esp, 0x1c
push 0x1e
jmp 0x1003794b
push 0x401
lea eax, [esp + 0x234]
push eax
lea eax, [esp + 0x3c]
push eax
movzx eax, word [esp + 0x3c]
push eax
call fcn.1004ea10
add esp, 0x10
and dword [esp + 0x28], 0
lea edi, [esp + 0x230]
lea eax, [esp + 0x2c]
push eax
push 0
push edi
push esi
call fcn.1002ca2b
add esp, 0x10
cmp eax, 1
jne 0x10037af9
lea eax, [esp + 0x2c]
push eax
push esi
call fcn.1002212b
pop ecx
pop ecx
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x10037b11
mov ebp, dword [eax]
push eax
push dword [esp + 0x18]
call fcn.1002cc2a
pop ecx
pop ecx
jmp 0x10037b13
xor ebp, ebp
test ebp, ebp
jne 0x10037b35
push edi
push str.failed_to_resolve_the_address_provided_to_PORT:__s
push dword [esp + 0x1c]
call fcn.100293e3
push ebx
call dword [0x1008d09c]
add esp, 0x10
jmp 0x10037aa3
push ebx
call dword [0x1008d09c]
or dword [esp + 0x14], 0xffffffff
pop ecx
xor edi, edi
lea eax, [esp + 0x10]
push eax
push 0
push ebp
push esi
call fcn.1002dec1
mov ebx, eax
add esp, 0x10
test ebx, ebx
je 0x10037b6a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebp, dword [ebp + 0x1c]
mov edi, eax
test ebp, ebp
jne 0x10037b44
test ebp, ebp
jne 0x10037b98
push 0x80
lea eax, [esp + 0xb4]
push eax
push edi
call fcn.1004de15
push eax
push 0x1008ffe0
push dword [esp + 0x28]
call fcn.100293e3
add esp, 0x18
jmp 0x10037aa3
push dword [ebp + 0x10]
lea eax, [esp + 0x34]
push dword [ebp + 0x18]
push eax
call fcn.1005b1c0
mov eax, dword [ebp + 0x10]
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x28]
add esp, 0xc
movzx ecx, ax
movzx eax, dx
push 2
movzx edi, dx
mov dword [esp + 0x28], eax
pop edx
cmp eax, ecx
jg 0x10037d06
cmp word [esp + 0x30], dx
jne 0x10037be5
push edi
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x32], ax
push dword [esp + 0x18]
lea eax, [esp + 0x34]
push eax
push dword [esp + 0x18]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x10037d06
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp dword [esp + 0x28], 0
je 0x10037c70
mov ecx, 0x2741
cmp eax, ecx
jne 0x10037c70
push 0x80
lea eax, [esp + 0xb4]
push eax
push ecx
call fcn.1004de15
mov edi, dword [esp + 0x20]
push eax
push dword [esp + 0x34]
push str.bind_port_hu__on_non_local_address_failed:__s_n
push edi
call fcn.10029490
add esp, 0x1c
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x34]
push eax
push dword [esi + 0x1a8]
mov dword [esp + 0x24], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x10037c97
mov eax, dword [esp + 0x20]
and dword [esp + 0x28], 0
movzx edi, ax
jmp 0x10037c7d
cmp eax, 0x2740
je 0x10037c7c
cmp eax, 0xd
jne 0x10037cce
inc edi
mov edx, dword [esp + 0x1c]
movzx eax, di
movzx ecx, dx
mov dword [esp + 0x24], eax
cmp eax, ecx
jg 0x10037d06
push 2
pop edx
jmp 0x10037bd2
push 0x80
lea eax, [esp + 0xb4]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.1004de15
push eax
push 0x10090024
push edi
call fcn.100293e3
push dword [esp + 0x28]
push esi
call fcn.1002d762
add esp, 0x20
jmp 0x10037aa3
push 0x80
lea ecx, [esp + 0xb4]
push ecx
push eax
call fcn.1004de15
push eax
movzx eax, di
push eax
push str.bind_port_hu__failed:__s
push dword [esp + 0x2c]
call fcn.100293e3
push dword [esp + 0x2c]
push esi
call fcn.1002d762
add esp, 0x24
jmp 0x10037aa3
cmp di, word [esp + 0x1c]
jbe 0x10037d2a
push str.bind___failed__we_ran_out_of_ports_
push dword [esp + 0x18]
call fcn.100293e3
push dword [esp + 0x18]
push esi
call fcn.1002d762
jmp 0x10037b2d
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x34]
push eax
push dword [esp + 0x18]
mov edi, 0x80
mov dword [esp + 0x24], edi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x10037d6f
push edi
lea eax, [esp + 0xb4]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.1004de15
push eax
push str.getsockname___failed:__s
push dword [esp + 0x28]
jmp 0x10037cb7
push 1
push dword [esp + 0x14]
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x10037d9c
push edi
lea eax, [esp + 0xb4]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.1004de15
push eax
push str.socket_failure:__s
jmp 0x10037d66
push 0x100
lea eax, [esp + 0x134]
push eax
push ebp
call fcn.1002ca03
mov edi, dword [esp + 0xa48]
add esp, 0xc
push 2
pop edx
cmp edi, edx
je 0x10037e0d
mov cx, word [esp + 0x30]
test dword [esi + 0x294], 0x40000
jne 0x10037dd5
test edi, edi
je 0x10037e08
cmp edi, 1
jne 0x10037ddf
cmp cx, dx
jne 0x10037e08
movzx eax, cx
sub eax, edx
jne 0x10037e08
push dword [esp + 0x32]
call dword [sym.imp.WS2_32.dll_ntohs]
movzx ebp, ax
test edi, edi
je 0x10037ee8
cmp edi, 1
je 0x10037e48
mov cx, word [esp + 0x30]
push 2
pop edx
inc edi
cmp edi, edx
jne 0x10037dc5
lea ebp, [esi + 0x4d0]
push esi
mov dword [ebp + 0x78], edi
call fcn.10035b02
mov eax, dword [esp + 0x14]
mov dword [esi + 0x1ac], eax
mov dword [esi + 0x290], 1
pop ecx
mov dword [esi + 0x554], 0x1c
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xa24
ret
lea edx, [esp + 0x634]
lea ebx, [esp + 0x130]
mov cl, byte [ebx]
test cl, cl
je 0x10037e75
movzx eax, cl
cmp cl, 0x2e
mov dword [esp + 0x24], 0x2c
cmove eax, dword [esp + 0x24]
mov byte [edx], al
inc edx
inc ebx
jne 0x10037e56
mov ecx, ebp
movzx eax, cl
push eax
shr ecx, 8
push ecx
push str.__d__d
push 0x14
push edx
mov byte [edx], 0
call fcn.1002f9d1
lea eax, [esp + 0x648]
push eax
push str.PORT
push 0x10090114
lea ebp, [esi + 0x4d0]
push ebp
call fcn.10050be4
mov ebx, eax
add esp, 0x24
test ebx, ebx
je 0x10037e13
push ebx
call fcn.1004defb
push eax
push str.Failure_sending_PORT_command:__s
push dword [esp + 0x20]
call fcn.100293e3
push dword [esp + 0x20]
push esi
call fcn.1002d762
add esp, 0x18
and dword [esi + 0x554], 0
jmp 0x10037e3b
push ebp
lea eax, [esp + 0x134]
push eax
push 2
pop ecx
xor eax, eax
cmp word [esp + 0x38], cx
lea ebp, [esi + 0x4d0]
setne al
inc eax
push eax
push str.EPRT
push str._s__d_s_hu
push ebp
call fcn.10050be4
mov ebx, eax
add esp, 0x18
test ebx, ebx
je 0x10037e13
push ebx
call fcn.1004defb
push eax
push str.Failure_sending_EPRT_command:__s
push dword [esp + 0x20]
call fcn.100293e3
push dword [esp + 0x20]
push esi
call fcn.1002d762
mov dword [ebp + 0x78], 1
jmp 0x10037ed9