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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9ac
mov eax, dword [0x1019ca20]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov esi, ecx
mov ebx, dword [esi]
push 0xff
lea ecx, [ebp - 0x103]
push 0
push ecx
mov dword [ebp - 0x9a0], eax
mov dword [ebp - 0x990], ebx
mov dword [ebp - 0x98c], 0xffffffff
mov byte [ebp - 0x104], 0
call fcn.1011b6d0
mov edi, dword [ebx + 0x5f8]
xor ecx, ecx
mov dword [ebp - 0x9ac], ecx
mov eax, dword [ebx + 0x5f8]
add esp, 0xc
mov dword [ebp - 0x9a4], ecx
mov dword [ebp - 0x99c], ecx
mov dword [ebp - 0x9a8], 1
mov dword [ebp - 0x994], ecx
cmp eax, ecx
je 0x10036d07
lea edx, [eax + 1]
jmp 0x10036bd0
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10036bd0
sub eax, edx
cmp eax, 1
jbe 0x10036d07
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10036be7
sub eax, edx
cmp eax, 0x16
jae 0x10036bfc
mov eax, 0x16
jmp 0x10036c0a
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10036c01
sub eax, edx
inc eax
push 1
push eax
call dword [0x10193010]
add esp, 8
mov dword [ebp - 0x994], eax
test eax, eax
jne 0x10036c37
pop edi
pop esi
mov eax, 0x1b
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10118be7
mov esp, ebp
pop ebp
ret
cmp byte [edi], 0x3a
jne 0x10036d79
mov ebx, edi
test ebx, ebx
je 0x10036cb6
push 0x3a
push ebx
call fcn.1011c9c0
mov edi, eax
add esp, 8
test edi, edi
je 0x10036cb6
push 0xa
lea ecx, [edi + 1]
push 0
push ecx
call fcn.1011ce62
push eax
call fcn.1002adf0
movzx ebx, ax
push 0x2d
push edi
mov dword [ebp - 0x9a4], ebx
call fcn.1011c9c0
add esp, 0x18
test eax, eax
je 0x10036dbf
push 0xa
inc eax
push 0
push eax
call fcn.1011ce62
push eax
call fcn.1002adf0
movzx eax, ax
add esp, 0x10
mov dword [ebp - 0x99c], eax
cmp bx, ax
jbe 0x10036cb6
xor eax, eax
mov dword [ebp - 0x99c], eax
mov dword [ebp - 0x9a4], eax
mov ebx, dword [ebp - 0x994]
cmp byte [ebx], 0
je 0x10036d07
mov ecx, dword [esi + 0x90]
mov edx, dword [esi + 0x54]
push 0x401
lea eax, [ebp - 0x508]
push eax
mov eax, dword [edx + 0x18]
push ebx
push ecx
push eax
call fcn.10010c30
mov ecx, dword [esi + 0x54]
mov edx, dword [ecx + 4]
add esp, 4
push eax
push edx
call fcn.10010c30
add esp, 0x18
sub eax, 0
je 0x10036dcd
dec eax
je 0x10036d63
dec eax
je 0x10036e04
mov edx, dword [esi + 0x1a8]
lea eax, [ebp - 0x998]
push eax
lea ecx, [ebp - 0x988]
push ecx
push edx
mov dword [ebp - 0x998], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x10036dd1
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.10025310
push eax
mov eax, dword [ebp - 0x990]
push str.getsockname___failed:__s
push eax
call fcn.1001fcf0
mov ecx, dword [ebp - 0x994]
push ecx
call dword [0x10193004]
add esp, 0x18
pop edi
pop esi
mov eax, 0x1e
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10118be7
mov esp, ebp
pop ebp
ret
push 0x3a
push edi
call fcn.1011c9c0
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x10036da4
mov eax, dword [ebp - 0x994]
mov edx, ebx
sub edx, edi
push edx
push edi
push eax
call fcn.1011caf0
add esp, 0xc
jmp 0x10036c42
mov edx, dword [ebp - 0x994]
mov eax, edi
sub edx, edi
mov edi, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x10036db0
jmp 0x10036cb6
movzx edx, bx
mov dword [ebp - 0x99c], edx
jmp 0x10036cb6
mov edi, ebx
jmp 0x10036e0a
movzx ecx, word [ebp - 0x988]
push 0x401
lea edx, [ebp - 0x508]
push edx
lea eax, [ebp - 0x984]
push eax
push ecx
call fcn.1002b4a0
mov ebx, dword [ebp - 0x994]
add esp, 0x10
mov dword [ebp - 0x9a8], 0
lea edi, [ebp - 0x508]
lea edx, [ebp - 0x9ac]
push edx
push 0
push edi
push esi
call fcn.100147c0
add esp, 0x10
cmp eax, 1
jne 0x10036e32
lea eax, [ebp - 0x9ac]
push eax
push esi
call fcn.10012d00
add esp, 8
mov eax, dword [ebp - 0x9ac]
test eax, eax
je 0x10036e58
mov ecx, dword [ebp - 0x990]
mov ebx, dword [eax]
push eax
push ecx
call fcn.10014d10
add esp, 8
test ebx, ebx
jne 0x10036e8a
mov ebx, dword [ebp - 0x994]
mov edx, dword [ebp - 0x990]
push edi
push str.failed_to_resolve_the_address_provided_to_PORT:__s
push edx
call fcn.1001fcf0
push ebx
call dword [0x10193004]
add esp, 0x10
pop edi
pop esi
mov eax, 0x1e
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10118be7
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x994]
push eax
call dword [0x10193004]
add esp, 4
mov dword [ebp - 0x98c], 0xffffffff
xor edi, edi
lea ecx, [ebp - 0x98c]
push ecx
push 0
push ebx
push esi
call fcn.100226e0
add esp, 0x10
mov dword [ebp - 0x994], eax
test eax, eax
je 0x10036ed4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, dword [ebx + 0x1c]
mov edi, eax
test ebx, ebx
jne 0x10036ea6
jmp 0x10036ed8
test ebx, ebx
jne 0x10036f0a
push edi
push esi
call fcn.10025310
mov edx, dword [ebp - 0x990]
push eax
push str.socket_failure:__s
push edx
call fcn.1001fcf0
add esp, 0x14
pop edi
pop esi
mov eax, 0x1e
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10118be7
mov esp, ebp
pop ebp
ret
mov eax, dword [ebx + 0x10]
mov ecx, dword [ebx + 0x18]
push eax
push ecx
lea edx, [ebp - 0x988]
push edx
call fcn.1011b7f0
mov cx, word [ebp - 0x99c]
mov eax, dword [ebx + 0x10]
movzx edi, word [ebp - 0x9a4]
add esp, 0xc
mov dword [ebp - 0x998], eax
cmp word [ebp - 0x9a4], cx
ja 0x1003709e
cmp word [ebp - 0x988], 2
jne 0x10036f5d
push edi
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x986], ax
mov edx, dword [ebp - 0x998]
mov ecx, dword [ebp - 0x98c]
push edx
lea eax, [ebp - 0x988]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x10037095
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp dword [ebp - 0x9a8], 0
je 0x10036fee
cmp eax, 0x2741
jne 0x10036fee
push eax
push esi
call fcn.10025310
push eax
mov eax, dword [ebp - 0x990]
movzx edx, di
push edx
push str.bind_port_hu__on_non_local_address_failed:__s_n
push eax
call fcn.1001fc70
mov eax, dword [esi + 0x1a8]
add esp, 0x18
lea ecx, [ebp - 0x998]
push ecx
lea edx, [ebp - 0x988]
push edx
push eax
mov dword [ebp - 0x998], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x1003700d
movzx edi, word [ebp - 0x9a4]
mov dword [ebp - 0x9a8], eax
jmp 0x10036ffb
cmp eax, 0x2740
je 0x10036ffa
cmp eax, 0xd
jne 0x10037052
inc edi
cmp di, word [ebp - 0x99c]
jbe 0x10036f45
jmp 0x1003709e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.10025310
mov ecx, dword [ebp - 0x990]
push eax
push str.getsockname___failed:__s
push ecx
call fcn.1001fcf0
mov edx, dword [ebp - 0x98c]
push edx
push esi
call fcn.10022680
add esp, 0x1c
pop edi
pop esi
mov eax, 0x1e
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10118be7
mov esp, ebp
pop ebp
ret
push eax
push esi
call fcn.10025310
mov ecx, dword [ebp - 0x990]
push eax
movzx eax, di
push eax
push str.bind_port_hu__failed:__s
push ecx
call fcn.1001fcf0
mov edx, dword [ebp - 0x98c]
push edx
push esi
call fcn.10022680
add esp, 0x20
pop edi
pop esi
mov eax, 0x1e
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10118be7
mov esp, ebp
pop ebp
ret
cmp di, word [ebp - 0x99c]
jbe 0x100370d5
mov eax, dword [ebp - 0x990]
push str.bind___failed__we_ran_out_of_ports_
push eax
call fcn.1001fcf0
mov ecx, dword [ebp - 0x98c]
push ecx
push esi
call fcn.10022680
add esp, 0x10
pop edi
pop esi
mov eax, 0x1e
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10118be7
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x98c]
lea edx, [ebp - 0x998]
push edx
lea eax, [ebp - 0x988]
push eax
push ecx
mov dword [ebp - 0x998], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x10037143
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.10025310
push eax
push str.getsockname___failed:__s
mov edx, dword [ebp - 0x990]
push edx
call fcn.1001fcf0
mov eax, dword [ebp - 0x98c]
push eax
push esi
call fcn.10022680
add esp, 0x1c
pop edi
pop esi
mov eax, 0x1e
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10118be7
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x98c]
push 1
push ecx
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x1003716b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.10025310
push eax
push str.socket_failure:__s
jmp 0x10037111
push 0x100
lea ecx, [ebp - 0x104]
push ecx
push ebx
call fcn.10014470
mov edi, dword [ebp - 0x9a0]
add esp, 0xc
cmp edi, 2
je 0x100371dc
mov cx, word [ebp - 0x988]
cmp dword [esi + 0x2e4], 0
jne 0x1003719f
test edi, edi
je 0x100371d6
cmp edi, 1
jne 0x100371aa
cmp cx, 2
jne 0x100371d6
movzx eax, cx
sub eax, 2
jne 0x100371d6
mov edx, dword [ebp - 0x986]
push edx
call dword [sym.imp.WS2_32.dll_ntohs]
movzx ebx, ax
test edi, edi
je 0x100371e7
cmp edi, 1
je 0x1003725d
mov cx, word [ebp - 0x988]
inc edi
cmp edi, 2
jne 0x10037192
mov ebx, dword [ebp - 0x994]
jmp 0x100372fc
xor edx, edx
cmp word [ebp - 0x988], 2
push ebx
setne dl
lea ecx, [ebp - 0x104]
push ecx
mov dword [ebp - 0x9a0], edi
lea edi, [esi + 0x510]
inc edx
push edx
push str.EPRT
push str._s__d_s_hu
push edi
call fcn.10064f30
mov ebx, eax
add esp, 0x18
test ebx, ebx
je 0x100372f6
push ebx
call fcn.10024bb0
push eax
mov eax, dword [ebp - 0x990]
push str.Failure_sending_EPRT_command:__s
push eax
call fcn.1001fcf0
mov ecx, dword [ebp - 0x98c]
push ecx
push esi
call fcn.10022680
add esp, 0x18
mov dword [edi + 0x78], 1
xor eax, eax
jmp 0x10037322
lea ecx, [ebp - 0x908]
lea edx, [ebp - 0x104]
lea esp, [esp]
mov al, byte [edx]
test al, al
je 0x10037285
cmp al, 0x2e
jne 0x1003727f
mov byte [ecx], 0x2c
jmp 0x10037281
mov byte [ecx], al
inc ecx
inc edx
jne 0x10037270
mov eax, ebx
mov edx, ebx
and edx, 0xff
push edx
shr eax, 8
push eax
push str.__d__d
push 0x14
push ecx
mov byte [ecx], 0
call fcn.10023f10
lea eax, [ebp - 0x908]
push eax
push str.PORT
lea eax, [esi + 0x510]
push 0x10141934
push eax
call fcn.10064f30
mov ebx, eax
add esp, 0x24
test ebx, ebx
je 0x100372fc
push ebx
call fcn.10024bb0
mov ecx, dword [ebp - 0x990]
push eax
push str.Failure_sending_PORT_command:__s
push ecx
call fcn.1001fcf0
mov edx, dword [ebp - 0x98c]
push edx
push esi
call fcn.10022680
add esp, 0x18
xor eax, eax
jmp 0x10037322
mov edi, dword [ebp - 0x9a0]
mov dword [esi + 0x588], edi
call fcn.100366c0
mov eax, dword [ebp - 0x98c]
mov dword [esi + 0x1ac], eax
mov dword [esi + 0x2c8], 1
mov eax, 0x1c
mov ecx, esi
call fcn.10036a00
mov ecx, dword [ebp - 4]
pop edi
pop esi
mov eax, ebx
xor ecx, ebp
pop ebx
call fcn.10118be7
mov esp, ebp
pop ebp
ret