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

Disassembly:
sub esp, 0xa28
mov eax, dword [0x10075610]
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.1004e1b0
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 0x1002f7f5
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1002f617
sub eax, edx
cmp eax, 1
jbe 0x1002f7f5
mov eax, edi
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1002f630
sub eax, edx
cmp eax, 0x41
jae 0x1002f645
mov eax, 0x41
jmp 0x1002f659
mov eax, edi
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1002f650
sub eax, edx
inc eax
push 1
push eax
call dword [0x10075010]
mov esi, eax
add esp, 8
test esi, esi
jne 0x1002f674
lea eax, [esi + 0x1b]
jmp 0x1002fc73
mov al, byte [edi]
cmp al, 0x5b
jne 0x1002f726
push 0x5d
push edi
lea ebx, [edi + 1]
call fcn.1004e580
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x1002f7a5
mov ecx, ebp
sub ecx, ebx
push ecx
push ebx
push esi
call fcn.1004e230
mov ebx, dword [esp + 0x2c]
add esp, 0xc
test ebp, ebp
je 0x1002f7a9
push 0x3a
push ebp
call fcn.1004e580
mov edi, eax
add esp, 8
test edi, edi
je 0x1002f7a9
push 0xa
lea ecx, [edi + 1]
push 0
push ecx
call fcn.1004e898
push eax
call fcn.1001b630
movzx ebp, ax
push 0x2d
push edi
mov dword [esp + 0x3c], ebp
call fcn.1004e580
add esp, 0x18
test eax, eax
je 0x1002f79c
push 0xa
inc eax
push 0
push eax
call fcn.1004e898
push eax
call fcn.1001b630
movzx eax, ax
add esp, 0x10
mov dword [esp + 0x18], eax
cmp bp, ax
jbe 0x1002f7a9
xor eax, eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x24], eax
jmp 0x1002f7a9
cmp al, 0x3a
jne 0x1002f731
mov ebp, edi
jmp 0x1002f6a9
push 0x3a
push edi
call fcn.1004e580
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x1002f787
lea edx, [esp + 0x30]
push edx
push edi
push 0x17
call fcn.10041180
add esp, 0xc
cmp eax, 1
jne 0x1002f773
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 0x1002f767
jmp 0x1002f7a9
mov eax, ebp
sub eax, edi
push eax
push edi
push esi
call fcn.1004e230
add esp, 0xc
jmp 0x1002f6a9
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 0x1002f790
jmp 0x1002f7a9
movzx edx, bp
mov dword [esp + 0x18], edx
jmp 0x1002f7a9
mov ebx, dword [esp + 0x20]
cmp byte [esi], 0
je 0x1002f7f5
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.100456e0
mov ecx, dword [ebx + 0x50]
mov edx, dword [ecx + 4]
add esp, 4
push eax
push edx
call fcn.10017230
add esp, 0x18
sub eax, 0
je 0x1002f855
sub eax, 1
je 0x1002f84b
sub eax, 1
je 0x1002f88f
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 0x1002f859
push 0x80
lea eax, [esp + 0xb4]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.10012730
mov ecx, dword [esp + 0x20]
push eax
push str.getsockname___failed:__s
push ecx
call fcn.1001bb50
push esi
call dword [0x10075004]
add esp, 0x1c
mov eax, 0x1e
jmp 0x1002fc73
mov edi, esi
jmp 0x1002f896
movzx eax, word [esp + 0x30]
push 0x401
lea edx, [esp + 0x234]
push edx
cmp eax, 0x17
je 0x1002f878
lea ecx, [esp + 0x3c]
push ecx
push eax
jmp 0x1002f87f
lea eax, [esp + 0x40]
push eax
push 0x17
call fcn.100429a0
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.1001d910
add esp, 0x10
cmp eax, 1
jne 0x1002f8ba
lea edx, [esp + 0x28]
push edx
push ebx
call fcn.10017670
add esp, 8
mov eax, dword [esp + 0x28]
test eax, eax
je 0x1002f8d6
mov ebp, dword [eax]
push eax
mov eax, dword [esp + 0x18]
push eax
call fcn.1001db30
add esp, 8
test ebp, ebp
jne 0x1002f8fa
mov ecx, dword [esp + 0x14]
push edi
push str.failed_to_resolve_the_address_provided_to_PORT:__s
push ecx
call fcn.1001bb50
push esi
call dword [0x10075004]
add esp, 0x10
mov eax, 0x1e
jmp 0x1002fc73
push esi
call dword [0x10075004]
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.100222a0
add esp, 0x10
mov dword [esp + 0x20], eax
test eax, eax
je 0x1002f93a
call edi
mov ebp, dword [ebp + 0x1c]
mov esi, eax
test ebp, ebp
jne 0x1002f914
jmp 0x1002f93e
test ebp, ebp
jne 0x1002f96e
push 0x80
lea eax, [esp + 0xb4]
push eax
push esi
call fcn.10012730
mov ecx, dword [esp + 0x20]
push eax
push str.socket_failure:__s
push ecx
call fcn.1001bb50
add esp, 0x18
mov eax, 0x1e
jmp 0x1002fc73
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0x18]
push edx
push eax
lea ecx, [esp + 0x38]
push ecx
call fcn.1004de40
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 0x1002fad4
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 0x1002facd
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test esi, esi
je 0x1002fa34
cmp eax, 0x2741
jne 0x1002fa34
push 0x80
lea eax, [esp + 0xb4]
push eax
push 0x2741
call fcn.10012730
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.1001ba70
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 0x1002fa51
movzx edi, word [esp + 0x24]
xor esi, esi
jmp 0x1002fa41
cmp eax, 0x2740
je 0x1002fa40
cmp eax, 0xd
jne 0x1002fa8e
inc edi
cmp di, word [esp + 0x18]
jbe 0x1002f9a0
jmp 0x1002fad4
push 0x80
lea edx, [esp + 0xb4]
push edx
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.10012730
push eax
push str.getsockname___failed:__s
push esi
call fcn.1001bb50
mov eax, dword [esp + 0x28]
push eax
push ebx
call fcn.10022220
add esp, 0x20
mov eax, 0x1e
jmp 0x1002fc73
push 0x80
lea ecx, [esp + 0xb4]
push ecx
push eax
call fcn.10012730
push eax
mov eax, dword [esp + 0x24]
movzx edx, di
push edx
push str.bind_port_hu__failed:__s
push eax
call fcn.1001bb50
mov ecx, dword [esp + 0x2c]
push ecx
push ebx
call fcn.10022220
add esp, 0x24
mov eax, 0x1e
jmp 0x1002fc73
cmp di, word [esp + 0x18]
jbe 0x1002fafb
mov edx, dword [esp + 0x14]
push str.bind___failed__we_ran_out_of_ports_
push edx
call fcn.1001bb50
mov eax, dword [esp + 0x18]
push eax
push ebx
call fcn.10022220
add esp, 0x10
mov eax, 0x1e
jmp 0x1002fc73
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 0x1002fb45
push 0x80
lea ecx, [esp + 0xb4]
push ecx
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.10012730
mov edx, dword [esp + 0x20]
push eax
push str.getsockname___failed:__s
push edx
jmp 0x1002fa71
mov ecx, dword [esp + 0x10]
push 1
push ecx
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x1002fb97
push 0x80
lea edx, [esp + 0xb4]
push edx
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.10012730
push eax
mov eax, dword [esp + 0x24]
push str.socket_failure:__s
push eax
call fcn.1001bb50
mov ecx, dword [esp + 0x28]
push ecx
push ebx
call fcn.10022220
add esp, 0x20
mov eax, 0x1e
jmp 0x1002fc73
push 0x100
lea edx, [esp + 0x134]
push edx
push ebp
call fcn.1001ce40
mov eax, dword [ebx + 0x280]
add esp, 0xc
test eax, 0x40000
jne 0x1002fbcc
test eax, 0x400
je 0x1002fbcc
or eax, 0x40000
mov dword [ebx + 0x280], eax
mov edi, dword [esp + 0xa3c]
cmp edi, 2
je 0x1002fc3b
mov esi, dword [sym.imp.WS2_32.dll_ntohs]
mov cx, word [esp + 0x30]
test dword [ebx + 0x280], 0x40000
jne 0x1002fbf3
test edi, edi
je 0x1002fc2e
cmp edi, 1
jne 0x1002fbfe
cmp cx, 2
jne 0x1002fc2e
movzx eax, cx
sub eax, 2
je 0x1002fc12
sub eax, 0x15
jne 0x1002fc2e
mov eax, dword [esp + 0x32]
push eax
jmp 0x1002fc17
mov ecx, dword [esp + 0x32]
push ecx
call esi
movzx ebp, ax
test edi, edi
je 0x1002fc8c
cmp edi, 1
je 0x1002fd0e
mov cx, word [esp + 0x30]
inc edi
cmp edi, 2
jne 0x1002fbe3
mov dword [esp + 0xa3c], edi
mov eax, dword [esp + 0xa3c]
mov esi, ebx
mov dword [ebx + 0x400], eax
call fcn.1002f160
mov ecx, dword [esp + 0x10]
mov dword [ebx + 0x1ac], ecx
mov eax, 0x1c
mov ecx, ebx
mov dword [ebx + 0x27c], 1
call fcn.1002f480
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0xa34]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.1004ada2
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.10045a50
mov edi, eax
add esp, 0x18
mov dword [esp + 0x20], edi
test edi, edi
je 0x1002fc3b
push edi
call fcn.10012010
mov edx, dword [esp + 0x18]
push eax
push str.Failure_sending_EPRT_command:__s
push edx
call fcn.1001bb50
mov eax, dword [esp + 0x20]
push eax
push ebx
call fcn.10022220
add esp, 0x18
xor eax, eax
mov ecx, ebx
mov dword [ebp + 0x78], 1
call fcn.1002f480
mov eax, edi
jmp 0x1002fc73
mov dword [esp + 0xa3c], edi
lea ecx, [esp + 0x634]
lea edx, [esp + 0x130]
mov al, byte [edx]
test al, al
je 0x1002fd3a
cmp al, 0x2e
jne 0x1002fd32
mov byte [ecx], 0x2c
jmp 0x1002fd34
mov byte [ecx], al
inc ecx
add edx, 1
jne 0x1002fd23
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.10023630
lea eax, [esp + 0x648]
push eax
push str.PORT
lea eax, [ebx + 0x388]
push 0x10069380
push eax
call fcn.10045a50
mov edi, eax
add esp, 0x24
mov dword [esp + 0x20], edi
test edi, edi
je 0x1002fc3b
push edi
call fcn.10012010
mov ecx, dword [esp + 0x18]
push eax
push str.Failure_sending_PORT_command:__s
push ecx
call fcn.1001bb50
mov edx, dword [esp + 0x20]
push edx
push ebx
call fcn.10022220
add esp, 0x18
xor eax, eax
mov ecx, ebx
call fcn.1002f480
mov eax, edi
jmp 0x1002fc73