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

Disassembly:
sub esp, 0x9a8
mov eax, dword [0x10139d20]
xor eax, esp
mov dword [esp + 0x9a4], eax
push ebx
push ebp
mov ebp, dword [esi]
push edi
xor ebx, ebx
push 0xff
lea eax, [esp + 0xb1]
push ebx
push eax
mov dword [esp + 0x34], ebx
mov dword [esp + 0x18], ebp
mov byte [esp + 0xb8], bl
call fcn.10077be0
mov edi, dword [ebp + 0x360]
mov dword [esp + 0x2c], ebx
mov eax, dword [ebp + 0x360]
add esp, 0xc
test eax, eax
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x24], 1
je 0x100d1c88
lea edx, [eax + 1]
jmp 0x100d1b20
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x100d1b20
sub eax, edx
cmp eax, 1
jbe 0x100d1c88
mov eax, edi
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x100d1b40
sub eax, edx
cmp eax, 0x16
jae 0x100d1b57
mov eax, 0x16
jmp 0x100d1b6b
mov eax, edi
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x100d1b60
sub eax, edx
add eax, 1
push 1
push eax
call dword [0x1013b3b8]
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x100d1b9d
pop edi
pop ebp
mov eax, 0x1b
pop ebx
mov ecx, dword [esp + 0x9a4]
xor ecx, esp
call fcn.100773e8
add esp, 0x9a8
ret
cmp byte [edi], 0x3a
jne 0x100d1c46
mov ebp, edi
test ebp, ebp
je 0x100d1c15
push 0x3a
push ebp
call fcn.1007d680
mov edi, eax
add esp, 8
test edi, edi
je 0x100d1c15
push 0xa
lea edx, [edi + 1]
push 0
push edx
call fcn.100863f5
push eax
call fcn.100db7c0
movzx ebp, ax
push 0x2d
push edi
mov dword [esp + 0x34], ebp
call fcn.1007d680
xor edi, edi
add esp, 0x18
cmp eax, edi
je 0x100d1c7f
push 0xa
add eax, 1
push edi
push eax
call fcn.100863f5
push eax
call fcn.100db7c0
movzx eax, ax
add esp, 0x10
cmp bp, ax
mov dword [esp + 0x18], eax
jbe 0x100d1c15
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], edi
cmp byte [ebx], 0
je 0x100d1c88
mov edx, dword [esi + 0x3c]
mov eax, dword [edx + 4]
push 0x401
lea ecx, [esp + 0x1b0]
push ecx
push ebx
push eax
call fcn.100df4e0
add esp, 0x10
test eax, eax
jne 0x100d1d1e
mov edi, ebx
jmp 0x100d1d25
push 0x3a
push edi
call fcn.1007d680
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x100d1c6b
mov ecx, ebp
sub ecx, edi
push ecx
push edi
push ebx
call fcn.1007edd0
add esp, 0xc
jmp 0x100d1ba8
mov edx, ebx
mov eax, edi
sub edx, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, 1
test cl, cl
jne 0x100d1c71
jmp 0x100d1c15
movzx eax, bp
mov dword [esp + 0x18], eax
jmp 0x100d1c15
mov eax, dword [esi + 0x130]
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x30]
push edx
push eax
mov dword [esp + 0x20], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x100d1cf6
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.100c7e40
mov ecx, dword [esp + 0x14]
push eax
push str.getsockname___failed:__s
push ecx
call fcn.100c3dc0
add esp, 0x14
test ebx, ebx
je 0x100d1cd9
push ebx
call dword [0x1013b3ac]
add esp, 4
pop edi
pop ebp
mov eax, 0x1e
pop ebx
mov ecx, dword [esp + 0x9a4]
xor ecx, esp
call fcn.100773e8
add esp, 0x9a8
ret
movzx ecx, word [esp + 0x2c]
push 0x401
lea edx, [esp + 0x1b0]
push edx
lea eax, [esp + 0x38]
push eax
push ecx
call fcn.100c8d40
add esp, 0x10
mov dword [esp + 0x24], 0
lea edi, [esp + 0x1ac]
lea edx, [esp + 0x20]
push edx
push 0
push edi
push esi
call fcn.100b9db0
add esp, 0x10
cmp eax, 1
jne 0x100d1d49
lea eax, [esp + 0x20]
push eax
push esi
call fcn.100b9820
add esp, 8
mov eax, dword [esp + 0x20]
test eax, eax
je 0x100d1d65
mov ecx, dword [esp + 0xc]
mov ebp, dword [eax]
push eax
push ecx
call fcn.100b9fa0
add esp, 8
test ebp, ebp
jne 0x100d1d7d
mov edx, dword [esp + 0xc]
push edi
push str.failed_to_resolve_the_address_provided_to_PORT:__s
push edx
call fcn.100c3dc0
add esp, 0xc
jmp 0x100d1ccb
test ebx, ebx
je 0x100d1d8b
push ebx
call dword [0x1013b3ac]
add esp, 4
mov ebx, dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, ebp
mov ebp, dword [sym.imp.WS2_32.dll_socket]
lea esp, [esp]
cmp dword [edi + 8], 0
jne 0x100d1dac
mov eax, dword [esi + 0x74]
mov dword [edi + 8], eax
mov ecx, dword [edi + 0xc]
mov edx, dword [edi + 8]
mov eax, dword [edi + 4]
push ecx
push edx
push eax
call ebp
cmp eax, 0xffffffff
mov dword [esp + 0x10], eax
jne 0x100d1deb
call ebx
mov edi, dword [edi + 0x1c]
test edi, edi
jne 0x100d1da0
push eax
push esi
call fcn.100c7e40
mov ecx, dword [esp + 0x14]
push eax
push str.socket_failure:__s
push ecx
call fcn.100c3dc0
add esp, 0x14
jmp 0x100d1cd9
mov edx, dword [edi + 0x10]
mov eax, dword [edi + 0x18]
push edx
push eax
lea ecx, [esp + 0x34]
push ecx
call fcn.1007a170
mov eax, dword [esp + 0x28]
mov edx, dword [edi + 0x10]
add esp, 0xc
cmp ax, word [esp + 0x18]
mov dword [esp + 0x14], edx
movzx ebp, ax
ja 0x100d1f26
mov ebx, dword [esp + 0xc]
lea ecx, [ecx]
cmp word [esp + 0x2c], 2
jne 0x100d1e34
push ebp
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x2e], ax
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
push eax
lea ecx, [esp + 0x30]
push ecx
push edx
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x100d1f1f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp dword [esp + 0x24], 0
je 0x100d1ead
cmp eax, 0x2741
jne 0x100d1ead
push eax
push esi
call fcn.100c7e40
push eax
movzx eax, bp
push eax
push str.bind_port_hu__on_non_local_address_failed:__s
push ebx
call fcn.100c3d30
mov eax, dword [esi + 0x130]
add esp, 0x18
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x30]
push edx
push eax
mov dword [esp + 0x20], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x100d1ec9
movzx ebp, word [esp + 0x1c]
mov dword [esp + 0x24], eax
jmp 0x100d1ebc
cmp eax, 0x2740
je 0x100d1eb9
cmp eax, 0xd
jne 0x100d1ef5
add ebp, 1
cmp bp, word [esp + 0x18]
jbe 0x100d1e20
jmp 0x100d1f26
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.100c7e40
push eax
push str.getsockname___failed:__s
push ebx
call fcn.100c3dc0
mov ecx, dword [esp + 0x24]
push ecx
push esi
call fcn.100c4a10
add esp, 0x1c
jmp 0x100d1cd9
push eax
push esi
call fcn.100c7e40
push eax
movzx edx, bp
push edx
push str.bind_port_hu__failed:__s
push ebx
call fcn.100c3dc0
mov eax, dword [esp + 0x28]
push eax
push esi
call fcn.100c4a10
add esp, 0x20
jmp 0x100d1cd9
cmp bp, word [esp + 0x18]
jbe 0x100d1f48
mov ecx, dword [esp + 0xc]
push str.bind___failed__we_ran_out_of_ports_
push ecx
call fcn.100c3dc0
mov edx, dword [esp + 0x18]
push edx
push esi
call fcn.100c4a10
add esp, 0x10
jmp 0x100d1cd9
mov ebp, dword [esp + 0x10]
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x30]
push ecx
push ebp
mov dword [esp + 0x20], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x100d1f91
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.100c7e40
push eax
push str.getsockname___failed:__s
push ebx
call fcn.100c3dc0
push ebp
push esi
call fcn.100c4a10
add esp, 0x1c
jmp 0x100d1cd9
push 1
push ebp
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x100d1fb3
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.100c7e40
push eax
push str.socket_failure:__s
jmp 0x100d1f7c
push 0x100
lea edx, [esp + 0xb0]
push edx
push edi
call fcn.100b9b70
mov ebx, dword [esp + 0x9c4]
add esp, 0xc
cmp ebx, 2
je 0x100d2024
mov ebp, dword [sym.imp.WS2_32.dll_ntohs]
mov cx, word [esp + 0x2c]
cmp dword [esi + 0x1e0], 0
jne 0x100d1fed
test ebx, ebx
je 0x100d201c
cmp ebx, 1
jne 0x100d1ff8
cmp cx, 2
jne 0x100d201c
movzx eax, cx
sub eax, 2
jne 0x100d201c
mov eax, dword [esp + 0x2e]
push eax
call ebp
test ebx, ebx
movzx edi, ax
je 0x100d207d
cmp ebx, 1
je 0x100d20ed
mov cx, word [esp + 0x2c]
add ebx, 1
cmp ebx, 2
jne 0x100d1fe0
mov edi, dword [esp + 0x28]
mov dword [esi + 0x434], ebx
mov eax, dword [esi + 0x134]
cmp eax, 0xffffffff
je 0x100d2043
push eax
push esi
call fcn.100c4a10
add esp, 8
mov eax, dword [esp + 0x10]
mov dword [esi + 0x134], eax
mov dword [esi + 0x1c0], 1
mov eax, 0x1c
mov ecx, esi
call fcn.100d19c0
mov ecx, dword [esp + 0x9b0]
mov eax, edi
pop edi
pop ebp
pop ebx
xor ecx, esp
call fcn.100773e8
add esp, 0x9a8
ret
xor eax, eax
cmp word [esp + 0x2c], 2
movzx ecx, di
setne al
push ecx
lea edx, [esp + 0xb0]
push edx
lea ebp, [esi + 0x3d0]
add eax, 1
push eax
push str.EPRT
push str._s__d_s_hu
push ebp
call fcn.100dd910
mov edi, eax
add esp, 0x18
test edi, edi
je 0x100d2028
push edi
call fcn.100c74d0
mov ecx, dword [esp + 0x10]
push eax
push str.Failure_sending_EPRT_command:__s
push ecx
call fcn.100c3dc0
mov edx, dword [esp + 0x20]
push edx
push esi
call fcn.100c4a10
add esp, 0x18
mov dword [ebp + 0x64], 1
xor eax, eax
jmp 0x100d205c
lea ecx, [esp + 0x5b0]
lea edx, [esp + 0xac]
jmp 0x100d2100
mov al, byte [edx]
test al, al
je 0x100d2119
cmp al, 0x2e
jne 0x100d210f
mov byte [ecx], 0x2c
jmp 0x100d2111
mov byte [ecx], al
add ecx, 1
add edx, 1
jne 0x100d2100
movzx eax, di
mov edx, eax
and edx, 0xff
push edx
shr eax, 8
push eax
push str.__d__d
push 0x14
push ecx
mov byte [ecx], 0
call fcn.100c5750
lea eax, [esp + 0x5c4]
push eax
push str.PORT
lea eax, [esi + 0x3d0]
push str._s__s
push eax
call fcn.100dd910
mov edi, eax
add esp, 0x24
test edi, edi
je 0x100d2028
push edi
call fcn.100c74d0
mov ecx, dword [esp + 0x10]
push eax
push str.Failure_sending_PORT_command:__s
push ecx
call fcn.100c3dc0
mov edx, dword [esp + 0x20]
push edx
push esi
call fcn.100c4a10
add esp, 0x18
xor eax, eax
jmp 0x100d205c