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

Disassembly:
sub esp, 0x9b0
mov eax, dword [0x10098688]
xor eax, esp
mov dword [esp + 0x9ac], eax
mov eax, dword [esp + 0x9b8]
or dword [esp], 0xffffffff
push ebx
push ebp
push esi
mov esi, dword [esp + 0x9c0]
push edi
mov ebp, dword [esi]
xor ebx, ebx
push 0xff
mov dword [esp + 0x30], eax
lea eax, [esp + 0xbd]
push ebx
push eax
mov byte [esp + 0xc4], bl
call fcn.1005ec70
mov edi, dword [ebp + 0x484]
mov dword [esp + 0x3c], ebx
mov ecx, dword [ebp + 0x484]
add esp, 0xc
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x34], 1
mov dword [esp + 0x14], ebx
test ecx, ecx
je 0x1004eda9
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1004ec57
sub ecx, edx
cmp ecx, 1
jbe 0x1004eda9
mov edx, edi
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x1004ec6e
sub edx, ecx
push 0x16
pop ecx
cmp edx, ecx
jb 0x1004ec8c
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1004ec83
sub ecx, edx
lea eax, [ecx + 1]
push 1
push eax
call dword [0x10098350]
mov ebx, eax
pop ecx
pop ecx
mov dword [esp + 0x14], ebx
test ebx, ebx
jne 0x1004ecac
push 0x1b
pop eax
jmp 0x1004f150
cmp byte [edi], 0x3a
jne 0x1004ecb5
mov ecx, edi
jmp 0x1004ecea
push 0x3a
push edi
call fcn.1005fe10
pop ecx
pop ecx
mov ecx, eax
mov dword [esp + 0x28], ecx
test ecx, ecx
je 0x1004ecdc
sub ecx, edi
push ecx
push edi
push ebx
call fcn.100606d0
mov ecx, dword [esp + 0x34]
add esp, 0xc
jmp 0x1004ecea
mov edx, ebx
sub edx, edi
mov al, byte [edi]
mov byte [edx + edi], al
inc edi
test al, al
jne 0x1004ece0
test ecx, ecx
je 0x1004ed5e
push 0x3a
push ecx
call fcn.1005fe10
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x1004ed5e
push 0xa
lea ecx, [edi + 1]
push 0
push ecx
call fcn.1006145e
push eax
call fcn.1003de20
movzx eax, ax
push 0x2d
push edi
mov dword [esp + 0x34], eax
call fcn.1005fe10
add esp, 0x18
test eax, eax
je 0x1004ed44
push 0xa
inc eax
push 0
push eax
call fcn.1006145e
push eax
call fcn.1003de20
mov ecx, dword [esp + 0x2c]
add esp, 0x10
movzx eax, ax
jmp 0x1004ed4b
mov ecx, dword [esp + 0x1c]
movzx eax, cx
mov dword [esp + 0x20], eax
cmp cx, ax
jbe 0x1004ed5e
and dword [esp + 0x20], 0
and dword [esp + 0x1c], 0
cmp byte [ebx], 0
je 0x1004eda3
push 0x401
lea eax, [esp + 0x1bc]
push eax
mov eax, dword [esi + 0x54]
push ebx
push dword [esi + 0x90]
push dword [eax + 0x18]
call fcn.1002ca04
pop ecx
push eax
mov eax, dword [esi + 0x54]
push dword [eax + 4]
call fcn.1002ca04
add esp, 0x18
sub eax, 0
je 0x1004ed9f
dec eax
je 0x1004edee
dec eax
jne 0x1004eda9
jmp 0x1004ee1a
mov edi, ebx
jmp 0x1004eda5
xor edi, edi
test edi, edi
jne 0x1004ee21
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x3c]
push eax
push dword [esi + 0x1a8]
mov dword [esp + 0x24], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x1004edf5
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.100409d4
push eax
push str.getsockname___failed:__s
push ebp
call fcn.10034609
push ebx
call dword [0x10098344]
add esp, 0x18
push 0x1e
jmp 0x1004eca6
push 0x401
lea eax, [esp + 0x1bc]
push eax
lea eax, [esp + 0x44]
push eax
movzx eax, word [esp + 0x44]
push eax
call fcn.10041254
add esp, 0x10
and dword [esp + 0x34], 0
lea edi, [esp + 0x1b8]
lea eax, [esp + 0x30]
push eax
push 0
push edi
push esi
call fcn.1002c42d
add esp, 0x10
cmp eax, 1
jne 0x1004ee44
lea eax, [esp + 0x30]
push eax
push esi
call fcn.1002bc45
pop ecx
pop ecx
mov eax, dword [esp + 0x30]
test eax, eax
je 0x1004ee59
mov ebx, dword [eax]
push eax
push ebp
call fcn.1002c583
pop ecx
pop ecx
jmp 0x1004ee5b
xor ebx, ebx
test ebx, ebx
jne 0x1004ee7d
push edi
push str.failed_to_resolve_the_address_provided_to_PORT:__s
push ebp
call fcn.10034609
push dword [esp + 0x20]
call dword [0x10098344]
add esp, 0x10
jmp 0x1004edee
push dword [esp + 0x14]
call dword [0x10098344]
or dword [esp + 0x14], 0xffffffff
and dword [esp + 0x18], 0
pop ecx
lea eax, [esp + 0x10]
push eax
push 0
push ebx
push esi
call fcn.10035470
mov edi, eax
add esp, 0x10
test edi, edi
je 0x1004eebc
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, dword [ebx + 0x1c]
mov dword [esp + 0x14], eax
test ebx, ebx
jne 0x1004ee92
jmp 0x1004eec0
mov eax, dword [esp + 0x14]
test ebx, ebx
jne 0x1004eedf
push eax
push esi
call fcn.100409d4
push eax
push str.socket_failure:__s
push ebp
call fcn.10034609
add esp, 0x14
jmp 0x1004edee
push dword [ebx + 0x10]
lea eax, [esp + 0x3c]
push dword [ebx + 0x18]
push eax
call fcn.1005e620
mov eax, dword [ebx + 0x10]
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x28]
movzx eax, ax
movzx edx, cx
mov ecx, dword [esp + 0x28]
add esp, 0xc
mov dword [esp + 0x24], eax
movzx ecx, cx
mov dword [esp + 0x14], 2
jmp 0x1004efd4
mov ecx, dword [esp + 0x14]
cmp word [esp + 0x38], cx
jne 0x1004ef36
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x3a], ax
push dword [esp + 0x18]
lea eax, [esp + 0x3c]
push eax
push dword [esp + 0x18]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x1004f03a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp dword [esp + 0x34], 0
je 0x1004efb1
mov ecx, 0x2741
cmp eax, ecx
jne 0x1004efb1
push ecx
push esi
call fcn.100409d4
push eax
push dword [esp + 0x34]
push str.bind_port_hu__on_non_local_address_failed:__s_n
push ebp
call fcn.100346c5
add esp, 0x18
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x3c]
push eax
push dword [esi + 0x1a8]
mov dword [esp + 0x24], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x1004efe2
mov eax, dword [esp + 0x1c]
and dword [esp + 0x34], 0
movzx eax, ax
jmp 0x1004efc2
cmp eax, 0x2740
je 0x1004efbd
cmp eax, 0xd
jne 0x1004f00d
mov eax, dword [esp + 0x24]
inc eax
mov dword [esp + 0x24], eax
movzx ecx, ax
mov eax, dword [esp + 0x20]
movzx edx, ax
mov eax, dword [esp + 0x24]
mov dword [esp + 0x28], ecx
cmp ecx, edx
jle 0x1004ef1f
jmp 0x1004f03e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.100409d4
push eax
push str.getsockname___failed:__s
push ebp
call fcn.10034609
push dword [esp + 0x24]
push esi
call fcn.10034d39
add esp, 0x1c
jmp 0x1004edee
push eax
push esi
call fcn.100409d4
push eax
mov eax, dword [esp + 0x30]
movzx eax, ax
push eax
push str.bind_port_hu__failed:__s
push ebp
call fcn.10034609
push dword [esp + 0x28]
push esi
call fcn.10034d39
add esp, 0x20
jmp 0x1004edee
mov eax, dword [esp + 0x24]
cmp ax, word [esp + 0x20]
jbe 0x1004f05f
push str.bind___failed__we_ran_out_of_ports_
push ebp
call fcn.10034609
push dword [esp + 0x18]
push esi
call fcn.10034d39
jmp 0x1004ee75
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x3c]
push eax
push dword [esp + 0x18]
mov dword [esp + 0x24], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x1004efe2
push 1
push dword [esp + 0x14]
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x1004f0ab
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.100409d4
push eax
push str.socket_failure:__s
jmp 0x1004eff5
push 0x100
lea eax, [esp + 0xbc]
push eax
push ebx
call fcn.1002c405
mov edx, dword [esp + 0x38]
mov ebx, dword [esp + 0x20]
add esp, 0xc
cmp edx, ebx
je 0x1004f120
mov cx, word [esp + 0x38]
cmp dword [esi + 0x414], 0
jne 0x1004f0df
test edx, edx
je 0x1004f117
cmp edx, 1
jne 0x1004f0e9
cmp cx, bx
jne 0x1004f117
movzx eax, cx
sub eax, ebx
jne 0x1004f117
push dword [esp + 0x3a]
call dword [sym.imp.WS2_32.dll_ntohs]
mov edx, dword [esp + 0x2c]
movzx ebx, ax
test edx, edx
je 0x1004f206
cmp edx, 1
je 0x1004f169
mov cx, word [esp + 0x38]
mov ebx, dword [esp + 0x14]
inc edx
mov dword [esp + 0x2c], edx
cmp edx, ebx
jne 0x1004f0d2
lea ebx, [esi + 0x6b8]
push esi
mov dword [ebx + 0x74], edx
call fcn.1004ce06
mov eax, dword [esp + 0x14]
mov dword [esi + 0x1ac], eax
mov dword [esi + 0x3f8], 1
pop ecx
mov dword [esi + 0x738], 0x1c
mov eax, edi
mov ecx, dword [esp + 0x9bc]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.1005c9a6
add esp, 0x9b0
ret
lea edx, [esp + 0x5bc]
lea edi, [esp + 0xb8]
mov cl, byte [edi]
test cl, cl
je 0x1004f196
movzx eax, cl
cmp cl, 0x2e
mov dword [esp + 0x28], 0x2c
cmove eax, dword [esp + 0x28]
mov byte [edx], al
inc edx
inc edi
jne 0x1004f177
mov ecx, ebx
movzx eax, cl
push eax
shr ecx, 8
push ecx
push str.__d__d
push 0x14
push edx
mov byte [edx], 0
call fcn.1003edd6
lea eax, [esp + 0x5d0]
push eax
push str.PORT
push 0x100889c8
lea ebx, [esi + 0x6b8]
push ebx
call fcn.10055b77
mov edi, eax
add esp, 0x24
test edi, edi
je 0x1004f263
push edi
call fcn.10040ac1
push eax
push str.Failure_sending_PORT_command:__s
push ebp
call fcn.10034609
push dword [esp + 0x20]
push esi
call fcn.10034d39
add esp, 0x18
and dword [esi + 0x738], 0
jmp 0x1004f14e
mov ecx, dword [esp + 0x14]
push ebx
lea eax, [esp + 0xbc]
push eax
xor eax, eax
cmp word [esp + 0x40], cx
lea ebx, [esi + 0x6b8]
setne al
inc eax
push eax
push str.EPRT
push str._s__d_s_hu
push ebx
call fcn.10055b77
mov edi, eax
add esp, 0x18
test edi, edi
je 0x1004f263
push edi
call fcn.10040ac1
push eax
push str.Failure_sending_EPRT_command:__s
push ebp
call fcn.10034609
push dword [esp + 0x20]
push esi
call fcn.10034d39
mov dword [ebx + 0x74], 1
jmp 0x1004f1f7
mov edx, dword [esp + 0x2c]
jmp 0x1004f126