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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa44
mov eax, dword [0x7c0ab4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 0xa40], edx
push 0x100
lea eax, [ebp - 0x108]
mov dword [ebp - 0xa44], edi
push 0
mov ebx, dword [edi]
push eax
mov dword [ebp - 0xa2c], ebx
call fcn.006d4310
mov esi, dword [ebx + 0x3d0]
add esp, 0xc
xor ebx, ebx
mov dword [ebp - 0xa28], 0
mov dword [ebp - 0xa34], 0
mov dword [ebp - 0xa38], 0
mov byte [ebp - 0xa21], 1
test esi, esi
je 0x4c3f15
push esi
call fcn.006e5360
add esp, 4
cmp eax, 1
jbe 0x4c3f15
push esi
call fcn.006e5360
add esp, 4
cmp eax, 0x16
jae 0x4c3dec
lea eax, [ebx + 0x16]
jmp 0x4c3df5
push esi
call fcn.006e5360
add esp, 4
inc eax
push 1
push eax
call fcn.006d7a40
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x4c3e1b
lea eax, [ebx + 0x1b]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006d0856
mov esp, ebp
pop ebp
ret
cmp byte [esi], 0x3a
je 0x4c3e4a
push 0x3a
push esi
call fcn.006d2640
add esp, 8
mov dword [ebp - 0xa30], eax
test eax, eax
je 0x4c3eb1
mov ecx, eax
sub ecx, esi
push ecx
push esi
push ebx
call fcn.006ea460
mov esi, dword [ebp - 0xa30]
add esp, 0xc
test esi, esi
je 0x4c3ebb
push 0x3a
push esi
call fcn.006d2640
mov esi, eax
add esp, 8
test esi, esi
je 0x4c3ebb
push 0xa
lea ecx, [esi + 1]
push 0
push ecx
call fcn.006e3ee1
add esp, 0xc
movzx eax, ax
mov dword [ebp - 0xa34], eax
push 0x2d
push esi
call fcn.006d2640
add esp, 8
test eax, eax
je 0x4c3ea0
push 0xa
inc eax
push 0
push eax
call fcn.006e3ee1
movzx ecx, ax
add esp, 0xc
mov dword [ebp - 0xa38], ecx
jmp 0x4c3ebb
mov eax, dword [ebp - 0xa34]
movzx ecx, ax
mov dword [ebp - 0xa38], ecx
jmp 0x4c3ebb
push esi
push ebx
call fcn.006e6d10
add esp, 8
mov esi, dword [ebp - 0xa38]
xor ecx, ecx
cmp word [ebp - 0xa34], si
movzx eax, si
cmovbe ecx, eax
mov eax, dword [ebp - 0xa34]
movzx edx, cx
xor ecx, ecx
cmp word [ebp - 0xa34], si
movzx eax, ax
cmovbe ecx, eax
cmp byte [ebx], 0
movzx ecx, cx
je 0x4c3f05
mov esi, edx
mov dword [ebp - 0xa34], ecx
mov eax, ebx
mov dword [ebp - 0xa38], esi
jmp 0x4c3f86
mov eax, ecx
mov dword [ebp - 0xa34], eax
mov eax, edx
mov dword [ebp - 0xa38], eax
lea eax, [ebp - 0xa3c]
mov dword [ebp - 0xa3c], 0x80
push eax
lea eax, [ebp - 0x990]
push eax
push dword [edi + 0x198]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x4c3f57
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov ecx, edi
call fcn.004bafa0
push eax
push str.getsockname___failed:__s
jmp 0x4c45dc
movzx ecx, word [ebp - 0x990]
lea eax, [ebp - 0x910]
push 0x401
push eax
lea edx, [ebp - 0x98c]
call fcn.004bb7e0
add esp, 8
lea eax, [ebp - 0x910]
xor cl, cl
mov byte [ebp - 0xa21], cl
lea ecx, [ebp - 0xa28]
mov dword [ebp - 0xa30], eax
push ecx
push 0
mov edx, eax
mov ecx, edi
call fcn.004b1a00
add esp, 8
cmp eax, 1
jne 0x4c3fb3
lea edx, [ebp - 0xa28]
mov ecx, edi
call fcn.004b2620
mov edx, dword [ebp - 0xa28]
test edx, edx
je 0x4c45d1
mov ecx, dword [ebp - 0xa2c]
mov esi, dword [edx]
call fcn.004b1b90
test esi, esi
je 0x4c45d1
push ebx
call fcn.006d6340
add esp, 4
nop
mov eax, dword [esi + 4]
mov ebx, dword [edi]
mov dword [ebp - 0xa20], eax
mov eax, dword [edi + 0x94]
cmp eax, 2
mov dword [ebp - 0xa1c], eax
mov eax, 0x11
mov dword [ebp - 0xa28], ebx
je 0x4c400a
mov eax, dword [esi + 0xc]
mov dword [ebp - 0xa18], eax
mov eax, dword [esi + 0x10]
mov dword [ebp - 0xa14], eax
cmp eax, 0x80
jbe 0x4c402f
mov dword [ebp - 0xa14], 0x80
mov eax, 0x80
push eax
push dword [esi + 0x18]
lea eax, [ebp - 0xa10]
push eax
call fcn.006d2cf0
mov ebx, dword [ebx + 0x1c0]
add esp, 0xc
test ebx, ebx
je 0x4c4070
lea eax, [ebp - 0xa20]
mov ecx, ebx
push eax
mov eax, dword [ebp - 0xa28]
push 0
push dword [eax + 0x1c4]
call dword [0x70d440]
call ebx
add esp, 0xc
jmp 0x4c4088
push dword [ebp - 0xa18]
push dword [ebp - 0xa1c]
push dword [ebp - 0xa20]
call dword [sym.imp.WS2_32.dll_socket]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4c40c2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, dword [esi + 0x1c]
test esi, esi
jne 0x4c3fe0
mov edx, eax
mov ecx, edi
call fcn.004bafa0
push eax
push str.socket_failure:__s
push dword [ebp - 0xa2c]
call fcn.004aef10
add esp, 0xc
jmp 0x4c45f3
push dword [esi + 0x10]
lea eax, [ebp - 0x990]
mov dword [ebp - 0xa28], 0
push dword [esi + 0x18]
push eax
call fcn.006d2cf0
mov eax, dword [esi + 0x10]
add esp, 0xc
mov ecx, dword [ebp - 0xa34]
mov dword [ebp - 0xa3c], eax
movzx eax, cx
mov dword [ebp - 0xa30], eax
cmp cx, word [ebp - 0xa38]
ja 0x4c41e0
cmp word [ebp - 0x990], 2
jne 0x4c411e
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x98e], ax
push dword [ebp - 0xa3c]
lea eax, [ebp - 0x990]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x4c4294
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp byte [ebp - 0xa21], 0
je 0x4c41b6
cmp eax, 0x2741
jne 0x4c41b6
mov edx, eax
mov ecx, edi
call fcn.004bafa0
push eax
mov eax, dword [ebp - 0xa30]
movzx eax, ax
push eax
push str.bind_port_hu__on_non_local_address_failed:__s_n
push dword [ebp - 0xa2c]
call fcn.004aee40
add esp, 0x10
mov dword [ebp - 0xa3c], 0x80
lea eax, [ebp - 0xa3c]
push eax
lea eax, [ebp - 0x990]
push eax
push dword [edi + 0x198]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x4c422e
mov eax, dword [ebp - 0xa34]
xor cl, cl
movzx eax, ax
mov byte [ebp - 0xa21], cl
jmp 0x4c41cd
cmp eax, 0x2740
je 0x4c41c6
cmp eax, 0xd
jne 0x4c425f
mov eax, dword [ebp - 0xa30]
inc eax
mov dword [ebp - 0xa30], eax
cmp ax, word [ebp - 0xa38]
jbe 0x4c4106
push str.bind___failed__we_ran_out_of_ports_
push dword [ebp - 0xa2c]
call fcn.004aef10
add esp, 8
cmp dword [edi + 0x40], 0
je 0x4c4219
cmp ebx, dword [edi + 0x19c]
jne 0x4c45b2
cmp byte [edi + 0x1a9], 0
je 0x4c45b2
mov byte [edi + 0x1a9], 0
mov edx, ebx
mov ecx, edi
call fcn.004ae8a0
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
jmp 0x4c45f3
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov ecx, edi
call fcn.004bafa0
push eax
push str.getsockname___failed:__s
push dword [ebp - 0xa2c]
call fcn.004aef10
add esp, 0xc
mov edx, ebx
mov ecx, edi
call fcn.004b0f90
jmp 0x4c45f3
mov edx, eax
mov ecx, edi
call fcn.004bafa0
push eax
mov eax, dword [ebp - 0xa30]
movzx eax, ax
push eax
push str.bind_port_hu__failed:__s
push dword [ebp - 0xa2c]
call fcn.004aef10
add esp, 0x10
mov edx, ebx
mov ecx, edi
call fcn.004b0f90
jmp 0x4c45f3
mov eax, dword [ebp - 0xa30]
cmp ax, word [ebp - 0xa38]
ja 0x4c41e0
lea eax, [ebp - 0xa3c]
mov dword [ebp - 0xa3c], 0x80
push eax
lea eax, [ebp - 0x990]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x4c42f2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov ecx, edi
call fcn.004bafa0
push eax
push str.getsockname___failed:__s
push dword [ebp - 0xa2c]
call fcn.004aef10
add esp, 0xc
jmp 0x4c41f3
push 1
push ebx
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x4c4327
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov ecx, edi
call fcn.004bafa0
push eax
push str.socket_failure:__s
push dword [ebp - 0xa2c]
call fcn.004aef10
add esp, 0xc
jmp 0x4c41f3
mov eax, dword [esi + 4]
sub eax, 2
jne 0x4c434e
mov edx, dword [esi + 0x18]
lea eax, [ebp - 0x108]
push 0x100
push eax
add edx, 4
mov ecx, 2
call fcn.004bb7e0
add esp, 8
mov esi, dword [ebp - 0xa40]
cmp esi, 2
je 0x4c43b3
mov cx, word [ebp - 0x990]
cmp byte [edi + 0x2a1], 0
jne 0x4c436d
test esi, esi
je 0x4c43ad
cmp esi, 1
jne 0x4c4378
cmp cx, 2
jne 0x4c43ad
movzx eax, cx
sub eax, 2
jne 0x4c43ad
push dword [ebp - 0x98e]
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
mov dword [ebp - 0xa40], eax
test esi, esi
je 0x4c4500
cmp esi, 1
je 0x4c4426
mov cx, word [ebp - 0x990]
inc esi
cmp esi, 2
jne 0x4c4360
mov dword [edi + 0x56c], esi
mov esi, dword [edi + 0x19c]
cmp esi, 0xffffffff
je 0x4c43ee
cmp dword [edi + 0x40], 0
je 0x4c43de
cmp byte [edi + 0x1a9], 0
je 0x4c4590
mov byte [edi + 0x1a9], 0
mov edx, esi
mov ecx, edi
call fcn.004ae8a0
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [ebp - 0xa28]
mov dword [edi + 0x5bc], 0
mov dword [edi + 0x19c], ebx
mov byte [edi + 0x29a], 1
mov dword [edi + 0x578], 0x1c
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006d0856
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x108]
mov edi, 0x2c
lea edx, [ebp - 0x508]
mov dword [ebp - 0xa28], eax
nop dword [eax]
mov cl, byte [eax]
test cl, cl
je 0x4c4463
cmp cl, 0x2e
movzx eax, cl
cmove eax, edi
mov byte [edx], al
inc edx
mov eax, dword [ebp - 0xa28]
add eax, 1
mov dword [ebp - 0xa28], eax
jne 0x4c4440
mov eax, dword [ebp - 0xa40]
movzx ecx, ax
movzx eax, cl
push eax
shr ecx, 8
push ecx
push str.__d__d
push 0x14
push edx
mov byte [edx], 0
call fcn.004ba680
mov edi, dword [ebp - 0xa44]
lea eax, [ebp - 0x508]
add esp, 0x14
push eax
push str.PORT
lea eax, [edi + 0x510]
push 0x796558
push eax
call fcn.004d4be0
add esp, 0x10
mov dword [ebp - 0xa28], eax
test eax, eax
je 0x4c43b3
mov ecx, eax
call fcn.004ba8c0
push eax
push str.Failure_sending_PORT_command:__s
push dword [ebp - 0xa2c]
call fcn.004aef10
add esp, 0xc
mov edx, ebx
mov ecx, edi
call fcn.004b0f90
mov eax, dword [ebp - 0xa28]
mov dword [edi + 0x578], 0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006d0856
mov esp, ebp
pop ebp
ret
movzx eax, ax
push eax
lea eax, [ebp - 0x108]
push eax
xor eax, eax
cmp word [ebp - 0x990], 2
setne al
inc eax
push eax
push str.EPRT
lea eax, [edi + 0x510]
push str._s__d_s_hu
push eax
call fcn.004d4be0
add esp, 0x18
mov dword [ebp - 0xa28], eax
test eax, eax
je 0x4c43b3
mov ecx, eax
call fcn.004ba8c0
push eax
push str.Failure_sending_EPRT_command:__s
push dword [ebp - 0xa2c]
call fcn.004aef10
add esp, 0xc
mov edx, ebx
mov ecx, edi
call fcn.004b0f90
mov eax, dword [ebp - 0xa28]
mov dword [edi + 0x56c], 1
mov dword [edi + 0x578], 0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006d0856
mov esp, ebp
pop ebp
ret
mov edx, esi
mov ecx, edi
call fcn.004ae8a0
push esi
mov esi, dword [edi + 0x40]
mov ecx, esi
push dword [edi + 0x44]
call dword [0x70d440]
call esi
add esp, 8
jmp 0x4c43ee
mov edx, ebx
mov ecx, edi
call fcn.004ae8a0
mov esi, dword [edi + 0x40]
mov ecx, esi
push ebx
push dword [edi + 0x44]
call dword [0x70d440]
call esi
add esp, 8
jmp 0x4c45f3
push dword [ebp - 0xa30]
push str.failed_to_resolve_the_address_provided_to_PORT:__s
push dword [ebp - 0xa2c]
call fcn.004aef10
add esp, 0xc
push ebx
call fcn.006d6340
add esp, 4
mov ecx, dword [ebp - 4]
mov eax, 0x1e
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.006d0856
mov esp, ebp
pop ebp
ret