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

Disassembly:
sub esp, 0xa28
mov eax, dword [0x10076610]
xor eax, esp
mov dword [esp + 0xa24], eax
push ebx
push ebp
push esi
push edi
mov ebx, ecx
mov ebp, dword [ebx]
push 0xff
xor esi, esi
lea eax, [esp + 0x135]
push esi
push eax
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x20], ebp
mov dword [esp + 0x1c], 0xffffffff
mov byte [esp + 0x13c], 0
call fcn.1004e4c0
mov edi, dword [ebp + 0x95c]
mov dword [esp + 0x34], esi
mov eax, dword [ebp + 0x95c]
add esp, 0xc
mov dword [esp + 0x24], esi
mov dword [esp + 0x18], esi
mov dword [esp + 0x2c], 1
cmp eax, esi
je 0x1002fae5
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1002f907
sub eax, edx
cmp eax, 1
jbe 0x1002fae5
mov eax, edi
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1002f920
sub eax, edx
cmp eax, 0x41
jae 0x1002f935
mov eax, 0x41
jmp 0x1002f949
mov eax, edi
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1002f940
sub eax, edx
inc eax
push 1
push eax
call dword [0x10076010]
mov esi, eax
add esp, 8
test esi, esi
jne 0x1002f964
lea eax, [esi + 0x1b]
jmp 0x1002ff63
mov al, byte [edi]
cmp al, 0x5b
jne 0x1002fa16
push 0x5d
push edi
lea ebx, [edi + 1]
call fcn.1004e890
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x1002fa95
mov ecx, ebp
sub ecx, ebx
push ecx
push ebx
push esi
call fcn.1004e540
mov ebx, dword [esp + 0x2c]
add esp, 0xc
test ebp, ebp
je 0x1002fa99
push 0x3a
push ebp
call fcn.1004e890
mov edi, eax
add esp, 8
test edi, edi
je 0x1002fa99
push 0xa
lea ecx, [edi + 1]
push 0
push ecx
call fcn.1004eba8
push eax
call fcn.1001b950
movzx ebp, ax
push 0x2d
push edi
mov dword [esp + 0x3c], ebp
call fcn.1004e890
add esp, 0x18
test eax, eax
je 0x1002fa8c
push 0xa
inc eax
push 0
push eax
call fcn.1004eba8
push eax
call fcn.1001b950
movzx eax, ax
add esp, 0x10
mov dword [esp + 0x18], eax
cmp bp, ax
jbe 0x1002fa99
xor eax, eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x24], eax
jmp 0x1002fa99
cmp al, 0x3a
jne 0x1002fa21
mov ebp, edi
jmp 0x1002f999
push 0x3a
push edi
call fcn.1004e890
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x1002fa77
lea edx, [esp + 0x30]
push edx
push edi
push 0x17
call fcn.100414a0
add esp, 0xc
cmp eax, 1
jne 0x1002fa63
xor eax, eax
mov edx, esi
mov dword [esp + 0x18], eax
mov dword [esp + 0x24], eax
mov eax, edi
sub edx, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x1002fa57
jmp 0x1002fa99
mov eax, ebp
sub eax, edi
push eax
push edi
push esi
call fcn.1004e540
add esp, 0xc
jmp 0x1002f999
mov edx, esi
mov eax, edi
sub edx, edi
lea ecx, [ecx]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x1002fa80
jmp 0x1002fa99
movzx edx, bp
mov dword [esp + 0x18], edx
jmp 0x1002fa99
mov ebx, dword [esp + 0x20]
cmp byte [esi], 0
je 0x1002fae5
mov ecx, dword [ebx + 0x8c]
mov edx, dword [ebx + 0x50]
push 0x401
lea eax, [esp + 0x234]
push eax
mov eax, dword [edx + 0x18]
push esi
push ecx
push eax
call fcn.10045a00
mov ecx, dword [ebx + 0x50]
mov edx, dword [ecx + 4]
add esp, 4
push eax
push edx
call fcn.10017560
add esp, 0x18
sub eax, 0
je 0x1002fb45
sub eax, 1
je 0x1002fb3b
sub eax, 1
je 0x1002fb7f
mov edx, dword [ebx + 0x1a8]
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x34]
push ecx
push edx
mov dword [esp + 0x28], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x1002fb49
push 0x80
lea eax, [esp + 0xb4]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.10012a60
mov ecx, dword [esp + 0x20]
push eax
push str.getsockname___failed:__s
push ecx
call fcn.1001bea0
push esi
call dword [0x10076004]
add esp, 0x1c
mov eax, 0x1e
jmp 0x1002ff63
mov edi, esi
jmp 0x1002fb86
movzx eax, word [esp + 0x30]
push 0x401
lea edx, [esp + 0x234]
push edx
cmp eax, 0x17
je 0x1002fb68
lea ecx, [esp + 0x3c]
push ecx
push eax
jmp 0x1002fb6f
lea eax, [esp + 0x40]
push eax
push 0x17
call fcn.10042cc0
add esp, 0x10
mov dword [esp + 0x2c], 0
lea edi, [esp + 0x230]
lea ecx, [esp + 0x28]
push ecx
push 0
push edi
push ebx
call fcn.1001dc60
add esp, 0x10
cmp eax, 1
jne 0x1002fbaa
lea edx, [esp + 0x28]
push edx
push ebx
call fcn.100179b0
add esp, 8
mov eax, dword [esp + 0x28]
test eax, eax
je 0x1002fbc6
mov ebp, dword [eax]
push eax
mov eax, dword [esp + 0x18]
push eax
call fcn.1001de80
add esp, 8
test ebp, ebp
jne 0x1002fbea
mov ecx, dword [esp + 0x14]
push edi
push str.failed_to_resolve_the_address_provided_to_PORT:__s
push ecx
call fcn.1001bea0
push esi
call dword [0x10076004]
add esp, 0x10
mov eax, 0x1e
jmp 0x1002ff63
push esi
call dword [0x10076004]
mov edi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
add esp, 4
mov dword [esp + 0x10], 0xffffffff
xor esi, esi
lea edx, [esp + 0x10]
push edx
push 0
push ebp
push ebx
call fcn.100225d0
add esp, 0x10
mov dword [esp + 0x20], eax
test eax, eax
je 0x1002fc2a
call edi
mov ebp, dword [ebp + 0x1c]
mov esi, eax
test ebp, ebp
jne 0x1002fc04
jmp 0x1002fc2e
test ebp, ebp
jne 0x1002fc5e
push 0x80
lea eax, [esp + 0xb4]
push eax
push esi
call fcn.10012a60
mov ecx, dword [esp + 0x20]
push eax
push str.socket_failure:__s
push ecx
call fcn.1001bea0
add esp, 0x18
mov eax, 0x1e
jmp 0x1002ff63
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0x18]
push edx
push eax
lea ecx, [esp + 0x38]
push ecx
call fcn.1004e150
mov eax, dword [esp + 0x30]
mov edx, dword [ebp + 0x10]
add esp, 0xc
mov dword [esp + 0x1c], edx
movzx edi, ax
cmp ax, word [esp + 0x18]
ja 0x1002fdc4
mov esi, dword [esp + 0x2c]
push edi
call dword [sym.imp.WS2_32.dll_htons]
mov edx, dword [esp + 0x10]
mov word [esp + 0x32], ax
mov eax, dword [esp + 0x1c]
push eax
lea ecx, [esp + 0x34]
push ecx
push edx
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x1002fdbd
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test esi, esi
je 0x1002fd24
cmp eax, 0x2741
jne 0x1002fd24
push 0x80
lea eax, [esp + 0xb4]
push eax
push 0x2741
call fcn.10012a60
mov esi, dword [esp + 0x20]
push eax
movzx ecx, di
push ecx
push str.bind_port_hu__on_non_local_address_failed:__s_n
push esi
call fcn.1001bdc0
mov ecx, dword [ebx + 0x1a8]
add esp, 0x1c
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x34]
push eax
push ecx
mov dword [esp + 0x28], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x1002fd41
movzx edi, word [esp + 0x24]
xor esi, esi
jmp 0x1002fd31
cmp eax, 0x2740
je 0x1002fd30
cmp eax, 0xd
jne 0x1002fd7e
inc edi
cmp di, word [esp + 0x18]
jbe 0x1002fc90
jmp 0x1002fdc4
push 0x80
lea edx, [esp + 0xb4]
push edx
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.10012a60
push eax
push str.getsockname___failed:__s
push esi
call fcn.1001bea0
mov eax, dword [esp + 0x28]
push eax
push ebx
call fcn.10022550
add esp, 0x20
mov eax, 0x1e
jmp 0x1002ff63
push 0x80
lea ecx, [esp + 0xb4]
push ecx
push eax
call fcn.10012a60
push eax
mov eax, dword [esp + 0x24]
movzx edx, di
push edx
push str.bind_port_hu__failed:__s
push eax
call fcn.1001bea0
mov ecx, dword [esp + 0x2c]
push ecx
push ebx
call fcn.10022550
add esp, 0x24
mov eax, 0x1e
jmp 0x1002ff63
cmp di, word [esp + 0x18]
jbe 0x1002fdeb
mov edx, dword [esp + 0x14]
push str.bind___failed__we_ran_out_of_ports_
push edx
call fcn.1001bea0
mov eax, dword [esp + 0x18]
push eax
push ebx
call fcn.10022550
add esp, 0x10
mov eax, 0x1e
jmp 0x1002ff63
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x34]
push edx
push eax
mov dword [esp + 0x28], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x1002fe35
push 0x80
lea ecx, [esp + 0xb4]
push ecx
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.10012a60
mov edx, dword [esp + 0x20]
push eax
push str.getsockname___failed:__s
push edx
jmp 0x1002fd61
mov ecx, dword [esp + 0x10]
push 1
push ecx
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x1002fe87
push 0x80
lea edx, [esp + 0xb4]
push edx
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.10012a60
push eax
mov eax, dword [esp + 0x24]
push str.socket_failure:__s
push eax
call fcn.1001bea0
mov ecx, dword [esp + 0x28]
push ecx
push ebx
call fcn.10022550
add esp, 0x20
mov eax, 0x1e
jmp 0x1002ff63
push 0x100
lea edx, [esp + 0x134]
push edx
push ebp
call fcn.1001d190
mov eax, dword [ebx + 0x280]
add esp, 0xc
test eax, 0x40000
jne 0x1002febc
test eax, 0x400
je 0x1002febc
or eax, 0x40000
mov dword [ebx + 0x280], eax
mov edi, dword [esp + 0xa3c]
cmp edi, 2
je 0x1002ff2b
mov esi, dword [sym.imp.WS2_32.dll_ntohs]
mov cx, word [esp + 0x30]
test dword [ebx + 0x280], 0x40000
jne 0x1002fee3
test edi, edi
je 0x1002ff1e
cmp edi, 1
jne 0x1002feee
cmp cx, 2
jne 0x1002ff1e
movzx eax, cx
sub eax, 2
je 0x1002ff02
sub eax, 0x15
jne 0x1002ff1e
mov eax, dword [esp + 0x32]
push eax
jmp 0x1002ff07
mov ecx, dword [esp + 0x32]
push ecx
call esi
movzx ebp, ax
test edi, edi
je 0x1002ff7c
cmp edi, 1
je 0x1002fffe
mov cx, word [esp + 0x30]
inc edi
cmp edi, 2
jne 0x1002fed3
mov dword [esp + 0xa3c], edi
mov eax, dword [esp + 0xa3c]
mov esi, ebx
mov dword [ebx + 0x400], eax
call fcn.1002f450
mov ecx, dword [esp + 0x10]
mov dword [ebx + 0x1ac], ecx
mov eax, 0x1c
mov ecx, ebx
mov dword [ebx + 0x27c], 1
call fcn.1002f770
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0xa34]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.1004b0b2
add esp, 0xa28
ret
xor ecx, ecx
cmp word [esp + 0x30], 2
movzx edx, bp
setne cl
push edx
lea eax, [esp + 0x134]
push eax
lea ebp, [ebx + 0x388]
mov dword [esp + 0xa44], edi
inc ecx
push ecx
push str.EPRT
push str._s__d_s_hu
push ebp
call fcn.10045d70
mov edi, eax
add esp, 0x18
mov dword [esp + 0x20], edi
test edi, edi
je 0x1002ff2b
push edi
call fcn.10012340
mov edx, dword [esp + 0x18]
push eax
push str.Failure_sending_EPRT_command:__s
push edx
call fcn.1001bea0
mov eax, dword [esp + 0x20]
push eax
push ebx
call fcn.10022550
add esp, 0x18
xor eax, eax
mov ecx, ebx
mov dword [ebp + 0x78], 1
call fcn.1002f770
mov eax, edi
jmp 0x1002ff63
mov dword [esp + 0xa3c], edi
lea ecx, [esp + 0x634]
lea edx, [esp + 0x130]
mov al, byte [edx]
test al, al
je 0x1003002a
cmp al, 0x2e
jne 0x10030022
mov byte [ecx], 0x2c
jmp 0x10030024
mov byte [ecx], al
inc ecx
add edx, 1
jne 0x10030013
movzx eax, bp
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.10023950
lea eax, [esp + 0x648]
push eax
push str.PORT
lea eax, [ebx + 0x388]
push 0x1006a380
push eax
call fcn.10045d70
mov edi, eax
add esp, 0x24
mov dword [esp + 0x20], edi
test edi, edi
je 0x1002ff2b
push edi
call fcn.10012340
mov ecx, dword [esp + 0x18]
push eax
push str.Failure_sending_PORT_command:__s
push ecx
call fcn.1001bea0
mov edx, dword [esp + 0x20]
push edx
push ebx
call fcn.10022550
add esp, 0x18
xor eax, eax
mov ecx, ebx
call fcn.1002f770
mov eax, edi
jmp 0x1002ff63