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

Disassembly:
sub esp, 0x61c
mov eax, dword [0x84dfc0]
xor eax, esp
mov dword [esp + 0x618], eax
push ebx
push ebp
push esi
push edi
mov ebx, ecx
mov ebp, dword [ebx]
push 0x2e
xor esi, esi
lea eax, [esp + 0xb5]
push esi
push eax
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x20], ebp
mov dword [esp + 0x1c], 0xffffffff
mov byte [esp + 0xbc], 0
call fcn.0048d310
mov edi, dword [ebp + 0x9ec]
mov dword [esp + 0x34], esi
mov eax, dword [ebp + 0x9ec]
add esp, 0xc
mov dword [esp + 0x24], esi
mov dword [esp + 0x18], esi
mov dword [esp + 0x2c], 1
cmp eax, esi
je 0x4d9feb
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4d9e04
sub eax, edx
cmp eax, 1
jbe 0x4d9feb
mov eax, edi
lea edx, [eax + 1]
jmp 0x4d9e20
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4d9e20
sub eax, edx
cmp eax, 0x41
jae 0x4d9e35
mov eax, 0x41
jmp 0x4d9e49
mov eax, edi
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4d9e40
sub eax, edx
inc eax
push 1
push eax
call dword [0x84f480]
mov esi, eax
add esp, 8
test esi, esi
jne 0x4d9e64
lea eax, [esi + 0x1b]
jmp 0x4da46d
mov al, byte [edi]
cmp al, 0x5b
jne 0x4d9f16
push 0x5d
push edi
lea ebx, [edi + 1]
call fcn.00491800
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x4d9f95
mov ecx, ebp
sub ecx, ebx
push ecx
push ebx
push esi
call fcn.004916c0
mov ebx, dword [esp + 0x2c]
add esp, 0xc
test ebp, ebp
je 0x4d9f99
push 0x3a
push ebp
call fcn.00491800
mov edi, eax
add esp, 8
test edi, edi
je 0x4d9f99
push 0xa
lea ecx, [edi + 1]
push 0
push ecx
call fcn.0049982d
push eax
call fcn.004bf750
movzx ebp, ax
push 0x2d
push edi
mov dword [esp + 0x3c], ebp
call fcn.00491800
add esp, 0x18
test eax, eax
je 0x4d9f8c
push 0xa
inc eax
push 0
push eax
call fcn.0049982d
push eax
call fcn.004bf750
movzx eax, ax
add esp, 0x10
mov dword [esp + 0x18], eax
cmp bp, ax
jbe 0x4d9f99
xor eax, eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x24], eax
jmp 0x4d9f99
cmp al, 0x3a
jne 0x4d9f21
mov ebp, edi
jmp 0x4d9e99
push 0x3a
push edi
call fcn.00491800
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x4d9f77
lea edx, [esp + 0x30]
push edx
push edi
push 0x17
call fcn.004ec250
add esp, 0xc
cmp eax, 1
jne 0x4d9f63
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 0x4d9f57
jmp 0x4d9f99
mov eax, ebp
sub eax, edi
push eax
push edi
push esi
call fcn.004916c0
add esp, 0xc
jmp 0x4d9e99
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 0x4d9f80
jmp 0x4d9f99
movzx edx, bp
mov dword [esp + 0x18], edx
jmp 0x4d9f99
mov ebx, dword [esp + 0x20]
cmp byte [esi], 0
je 0x4d9feb
mov ecx, dword [ebx + 0x2f4]
mov edx, dword [ebx + 0x2b8]
push 0x401
lea eax, [esp + 0x228]
push eax
mov eax, dword [edx + 0x18]
push esi
push ecx
push eax
call fcn.004ed810
mov ecx, dword [ebx + 0x2b8]
mov edx, dword [ecx + 4]
add esp, 4
push eax
push edx
call fcn.0051db30
add esp, 0x18
sub eax, 0
je 0x4da04b
sub eax, 1
je 0x4da041
sub eax, 1
je 0x4da089
mov edx, dword [ebx + 0x420]
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 0x4da04f
push 0x100
lea eax, [esp + 0x128]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.004eb470
mov ecx, dword [esp + 0x20]
push eax
push str.getsockname___failed:__s
push ecx
call fcn.004bd3d0
push esi
call dword [0x84f474]
add esp, 0x1c
mov eax, 0x1e
jmp 0x4da46d
mov edi, esi
jmp 0x4da090
movzx eax, word [esp + 0x30]
push 0x401
lea edx, [esp + 0x228]
push edx
cmp eax, 0x17
je 0x4da06e
lea ecx, [esp + 0x3c]
push ecx
push eax
jmp 0x4da075
lea eax, [esp + 0x40]
push eax
push 0x17
call fcn.004edc50
add esp, 0x10
test eax, eax
je 0x4da041
mov dword [esp + 0x2c], 0
lea edi, [esp + 0x224]
lea ecx, [esp + 0x28]
push ecx
push 0
push 0
push edi
push ebx
call fcn.004e5a20
add esp, 0x14
cmp eax, 1
jne 0x4da0b6
lea edx, [esp + 0x28]
push edx
push ebx
call fcn.004b3af0
add esp, 8
mov eax, dword [esp + 0x28]
test eax, eax
je 0x4da0d2
mov ebp, dword [eax]
push eax
mov eax, dword [esp + 0x18]
push eax
call fcn.004e5cb0
add esp, 8
test ebp, ebp
jne 0x4da0f6
mov ecx, dword [esp + 0x14]
push edi
push str.failed_to_resolve_the_address_provided_to_PORT:__s
push ecx
call fcn.004bd3d0
push esi
call dword [0x84f474]
add esp, 0x10
mov eax, 0x1e
jmp 0x4da46d
push esi
call dword [0x84f474]
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.004c3260
add esp, 0x10
mov dword [esp + 0x20], eax
test eax, eax
je 0x4da136
call edi
mov ebp, dword [ebp + 0x1c]
mov esi, eax
test ebp, ebp
jne 0x4da110
jmp 0x4da13a
test ebp, ebp
jne 0x4da16a
push 0x100
lea eax, [esp + 0x128]
push eax
push esi
call fcn.004eb470
mov ecx, dword [esp + 0x20]
push eax
push str.socket_failure:__s
push ecx
call fcn.004bd3d0
add esp, 0x18
mov eax, 0x1e
jmp 0x4da46d
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0x18]
push edx
push eax
lea ecx, [esp + 0x38]
push ecx
call fcn.004909c0
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 0x4da2d4
mov esi, dword [esp + 0x2c]
lea esp, [esp]
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 0x4da2cd
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test esi, esi
je 0x4da234
cmp eax, 0x2741
jne 0x4da234
push 0x100
lea eax, [esp + 0x128]
push eax
push 0x2741
call fcn.004eb470
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.004bd2f0
mov ecx, dword [ebx + 0x420]
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 0x4da251
movzx edi, word [esp + 0x24]
xor esi, esi
jmp 0x4da241
cmp eax, 0x2740
je 0x4da240
cmp eax, 0xd
jne 0x4da28e
inc edi
cmp di, word [esp + 0x18]
jbe 0x4da1a0
jmp 0x4da2d4
push 0x100
lea edx, [esp + 0x128]
push edx
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.004eb470
push eax
push str.getsockname___failed:__s
push esi
call fcn.004bd3d0
mov eax, dword [esp + 0x28]
push eax
push ebx
call fcn.004c31d0
add esp, 0x20
mov eax, 0x1e
jmp 0x4da46d
push 0x100
lea ecx, [esp + 0x128]
push ecx
push eax
call fcn.004eb470
push eax
mov eax, dword [esp + 0x24]
movzx edx, di
push edx
push str.bind_port_hu__failed:__s
push eax
call fcn.004bd3d0
mov ecx, dword [esp + 0x2c]
push ecx
push ebx
call fcn.004c31d0
add esp, 0x24
mov eax, 0x1e
jmp 0x4da46d
cmp di, word [esp + 0x18]
jbe 0x4da2fb
mov edx, dword [esp + 0x14]
push str.bind___failed__we_ran_out_of_ports_
push edx
call fcn.004bd3d0
mov eax, dword [esp + 0x18]
push eax
push ebx
call fcn.004c31d0
add esp, 0x10
mov eax, 0x1e
jmp 0x4da46d
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 0x4da345
push 0x100
lea ecx, [esp + 0x128]
push ecx
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.004eb470
mov edx, dword [esp + 0x20]
push eax
push str.getsockname___failed:__s
push edx
jmp 0x4da271
mov ecx, dword [esp + 0x10]
push 1
push ecx
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x4da397
push 0x100
lea edx, [esp + 0x128]
push edx
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.004eb470
push eax
mov eax, dword [esp + 0x24]
push str.socket_failure:__s
push eax
call fcn.004bd3d0
mov ecx, dword [esp + 0x28]
push ecx
push ebx
call fcn.004c31d0
add esp, 0x20
mov eax, 0x1e
jmp 0x4da46d
push 0x2f
lea edx, [esp + 0xb4]
push edx
push ebp
call fcn.004e4fa0
add esp, 0xc
cmp dword [ebx + 0x58c], 0
jne 0x4da3c6
cmp dword [ebx + 0x570], 0
je 0x4da3c6
mov dword [ebx + 0x58c], 1
mov edi, dword [esp + 0x630]
cmp edi, 2
je 0x4da435
mov esi, dword [sym.imp.WS2_32.dll_ntohs]
mov cx, word [esp + 0x30]
lea ecx, [ecx]
cmp dword [ebx + 0x58c], 0
jne 0x4da3ed
test edi, edi
je 0x4da428
cmp edi, 1
jne 0x4da3f8
cmp cx, 2
jne 0x4da428
movzx eax, cx
sub eax, 2
je 0x4da40c
sub eax, 0x15
jne 0x4da428
mov eax, dword [esp + 0x32]
push eax
jmp 0x4da411
mov ecx, dword [esp + 0x32]
push ecx
call esi
movzx ebp, ax
test edi, edi
je 0x4da486
cmp edi, 1
je 0x4da50b
mov cx, word [esp + 0x30]
inc edi
cmp edi, 2
jne 0x4da3e0
mov dword [esp + 0x630], edi
mov eax, dword [esp + 0x630]
mov esi, ebx
mov dword [ebx + 0x718], eax
call fcn.004d9970
mov ecx, dword [esp + 0x10]
mov dword [ebx + 0x424], ecx
mov eax, 0x1c
mov ecx, ebx
mov dword [ebx + 0x530], 1
call fcn.004d9c60
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x628]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0048d1f2
add esp, 0x61c
ret
xor ecx, ecx
cmp word [esp + 0x30], 2
movzx edx, bp
setne cl
push edx
lea eax, [esp + 0xb4]
push eax
lea ebp, [ebx + 0x690]
mov dword [esp + 0x638], edi
inc ecx
push ecx
push str.EPRT
push str._s__d_s_hu
push ebp
call fcn.004eee90
mov edi, eax
add esp, 0x18
mov dword [esp + 0x20], edi
test edi, edi
je 0x4da435
push edi
call fcn.004ea9f0
mov edx, dword [esp + 0x18]
push eax
push str.Failure_sending_EPRT_command:__s
push edx
call fcn.004bd3d0
mov eax, dword [esp + 0x20]
push eax
push ebx
call fcn.004c31d0
add esp, 0x18
xor eax, eax
mov ecx, ebx
mov dword [ebp + 0x88], 1
call fcn.004d9c60
mov eax, edi
jmp 0x4da46d
mov dword [esp + 0x630], edi
lea ecx, [esp + 0xe0]
lea edx, [esp + 0xb0]
mov al, byte [edx]
test al, al
je 0x4da537
cmp al, 0x2e
jne 0x4da52f
mov byte [ecx], 0x2c
jmp 0x4da531
mov byte [ecx], al
inc ecx
add edx, 1
jne 0x4da520
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.004c5f00
lea eax, [esp + 0xf4]
push eax
push str.PORT
lea eax, [ebx + 0x690]
push 0x79454c
push eax
call fcn.004eee90
mov edi, eax
add esp, 0x24
mov dword [esp + 0x20], edi
test edi, edi
je 0x4da435
push edi
call fcn.004ea9f0
mov ecx, dword [esp + 0x18]
push eax
push str.Failure_sending_PORT_command:__s
push ecx
call fcn.004bd3d0
mov edx, dword [esp + 0x20]
push edx
push ebx
call fcn.004c31d0
add esp, 0x18
xor eax, eax
mov ecx, ebx
call fcn.004d9c60
mov eax, edi
jmp 0x4da46d