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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9c8
mov eax, dword [0x56adc0]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [eax]
push edi
lea edx, [eax + 0x3e0]
xor ebx, ebx
push 0xff
mov dword [ebp - 0x9a0], eax
lea eax, [ebp - 0x10b]
push ebx
push eax
mov dword [ebp - 0x9c4], ecx
mov dword [ebp - 0x9b0], edx
mov dword [ebp - 0x99c], esi
mov byte [ebp - 0x10c], bl
call fcn.004fbb00
mov esi, dword [esi + 0x3a4]
add esp, 0xc
mov dword [ebp - 0x9a4], ebx
mov dword [ebp - 0x9b4], ebx
mov dword [ebp - 0x9ac], ebx
mov dword [ebp - 0x9b8], 1
mov dword [ebp - 0x998], ebx
cmp esi, ebx
je 0x4d7f2b
mov eax, esi
lea edx, [eax + 1]
jmp 0x4d7e20
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4d7e20
sub eax, edx
cmp eax, 1
jbe 0x4d7f2b
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4d7e37
sub eax, edx
cmp eax, 0x16
jae 0x4d7e4c
mov eax, 0x16
jmp 0x4d7e5a
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4d7e51
sub eax, edx
inc eax
push 1
push eax
call dword [0x56e858]
mov ebx, eax
add esp, 8
mov dword [ebp - 0x998], ebx
test ebx, ebx
jne 0x4d7e87
lea eax, [ebx + 0x1b]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004f6bad
mov esp, ebp
pop ebp
ret
cmp byte [esi], 0x3a
jne 0x4d7fa8
mov edi, esi
test edi, edi
je 0x4d7f0e
push 0x3a
push edi
call fcn.004f7ad0
mov esi, eax
add esp, 8
test esi, esi
je 0x4d7f0e
push 0xa
lea edx, [esi + 1]
push 0
push edx
call fcn.00512187
add esp, 0xc
push eax
call fcn.004cc230
add esp, 4
movzx edi, ax
push 0x2d
push esi
mov dword [ebp - 0x9b4], edi
call fcn.004f7ad0
add esp, 8
test eax, eax
je 0x4d7fe2
push 0xa
xor esi, esi
inc eax
push esi
push eax
call fcn.00512187
add esp, 0xc
push eax
call fcn.004cc230
movzx eax, ax
add esp, 4
mov dword [ebp - 0x9ac], eax
cmp di, ax
jbe 0x4d7f0e
mov dword [ebp - 0x9ac], esi
mov dword [ebp - 0x9b4], esi
cmp byte [ebx], 0
je 0x4d7f2b
call fcn.004711b0
sub eax, 0
je 0x4d7ff0
dec eax
je 0x4d7f92
dec eax
je 0x4d8023
mov esi, dword [ebp - 0x9a0]
mov eax, dword [esi + 0x140]
lea ecx, [ebp - 0x9a8]
push ecx
lea edx, [ebp - 0x994]
push edx
push eax
mov dword [ebp - 0x9a8], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x4d7ff8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push esi
mov edi, eax
call fcn.004e1010
mov ecx, dword [ebp - 0x99c]
add esp, 4
push eax
push str.getsockname___failed:__s
push ecx
call fcn.004c1e70
add esp, 0xc
test ebx, ebx
je 0x4d7f92
push ebx
call dword [0x56e84c]
add esp, 4
mov eax, 0x1e
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004f6bad
mov esp, ebp
pop ebp
ret
push 0x3a
push esi
call fcn.004f7ad0
mov edi, eax
add esp, 8
test edi, edi
je 0x4d7fcd
mov ecx, edi
sub ecx, esi
push ecx
push esi
push ebx
call fcn.005298a0
add esp, 0xc
jmp 0x4d7e92
mov edx, ebx
mov eax, esi
sub edx, esi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4d7fd3
jmp 0x4d7f0e
movzx eax, di
mov dword [ebp - 0x9ac], eax
jmp 0x4d7f0e
mov ebx, dword [ebp - 0x998]
jmp 0x4d8029
movzx eax, word [ebp - 0x994]
lea edx, [ebp - 0x990]
push 0x401
push edx
lea esi, [ebp - 0x514]
call fcn.004e0810
add esp, 8
mov dword [ebp - 0x9b8], 0
lea ebx, [ebp - 0x514]
mov esi, dword [ebp - 0x9a0]
lea eax, [ebp - 0x9a4]
push eax
push 0
push ebx
push esi
call fcn.004c0cd0
add esp, 0x10
cmp eax, 1
jne 0x4d8052
lea eax, [ebp - 0x9a4]
call fcn.004c1470
mov edi, dword [ebp - 0x9a4]
test edi, edi
je 0x4d806d
mov eax, dword [ebp - 0x99c]
mov esi, dword [edi]
call fcn.004c0ea0
test esi, esi
jne 0x4d80b0
mov ecx, dword [ebp - 0x99c]
push ebx
push str.failed_to_resolve_the_address_provided_to_PORT:__s
push ecx
call fcn.004c1e70
mov eax, dword [ebp - 0x998]
add esp, 0xc
test eax, eax
je 0x4d7f92
push eax
call dword [0x56e84c]
add esp, 4
mov eax, 0x1e
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004f6bad
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x998]
test eax, eax
je 0x4d80c4
push eax
call dword [0x56e84c]
add esp, 4
mov edi, esi
mov dword [ebp - 0x998], 0xffffffff
mov dword [ebp - 0x9bc], 0
mov dword [ebp - 0x9a4], edi
jmp 0x4d80e8
mov edi, dword [ebp - 0x9a4]
mov edx, dword [ebp - 0x9a0]
push edx
lea ebx, [ebp - 0x998]
xor edx, edx
mov ecx, edi
call fcn.004c08e0
add esp, 4
mov dword [ebp - 0x9c0], eax
test eax, eax
je 0x4d8126
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, dword [edi + 0x1c]
mov dword [ebp - 0x9bc], eax
mov dword [ebp - 0x9a4], edi
test edi, edi
jne 0x4d80e2
jmp 0x4d812a
test edi, edi
jne 0x4d816a
mov eax, dword [ebp - 0x9a0]
mov edi, dword [ebp - 0x9bc]
push eax
call fcn.004e1010
mov ecx, dword [ebp - 0x99c]
add esp, 4
push eax
push str.socket_failure:__s
push ecx
call fcn.004c1e70
add esp, 0xc
mov eax, 0x1e
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004f6bad
mov esp, ebp
pop ebp
ret
mov edx, dword [edi + 0x10]
mov eax, dword [edi + 0x18]
push edx
push eax
lea ecx, [ebp - 0x994]
push ecx
call fcn.004fb720
mov eax, dword [ebp - 0x9b4]
mov edx, dword [edi + 0x10]
add esp, 0xc
mov dword [ebp - 0x9a8], edx
movzx esi, ax
cmp ax, word [ebp - 0x9ac]
ja 0x4d830f
cmp word [ebp - 0x994], 2
jne 0x4d81b8
push esi
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x992], ax
mov eax, dword [ebp - 0x9a8]
mov edx, dword [ebp - 0x998]
push eax
lea ecx, [ebp - 0x994]
push ecx
push edx
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x4d8306
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp dword [ebp - 0x9b8], 0
je 0x4d8257
cmp eax, 0x2741
jne 0x4d8257
mov ebx, dword [ebp - 0x9a0]
push ebx
mov edi, eax
call fcn.004e1010
add esp, 4
push eax
movzx eax, si
mov esi, dword [ebp - 0x99c]
push eax
push str.bind_port_hu__on_non_local_address_failed:__s_n
push esi
call fcn.004c1df0
mov eax, dword [ebx + 0x140]
add esp, 0x10
lea ecx, [ebp - 0x9a8]
push ecx
lea edx, [ebp - 0x994]
push edx
push eax
mov dword [ebp - 0x9a8], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x4d8276
movzx esi, word [ebp - 0x9b4]
mov dword [ebp - 0x9b8], eax
jmp 0x4d8264
cmp eax, 0x2740
je 0x4d8263
cmp eax, 0xd
jne 0x4d82b9
inc esi
cmp si, word [ebp - 0x9ac]
jbe 0x4d81a0
jmp 0x4d830f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push ebx
mov edi, eax
call fcn.004e1010
add esp, 4
push eax
push str.getsockname___failed:__s
push esi
call fcn.004c1e70
mov esi, dword [ebp - 0x998]
add esp, 0xc
mov eax, ebx
call fcn.004c0890
mov eax, 0x1e
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004f6bad
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp - 0x9a0]
push ebx
mov edi, eax
call fcn.004e1010
mov edx, dword [ebp - 0x99c]
add esp, 4
push eax
movzx ecx, si
push ecx
push str.bind_port_hu__failed:__s
push edx
call fcn.004c1e70
mov esi, dword [ebp - 0x998]
add esp, 0x10
mov eax, ebx
call fcn.004c0890
mov eax, 0x1e
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004f6bad
mov esp, ebp
pop ebp
ret
cmp si, word [ebp - 0x9ac]
jbe 0x4d834a
mov eax, dword [ebp - 0x99c]
push str.bind___failed__we_ran_out_of_ports_
push eax
call fcn.004c1e70
mov esi, dword [ebp - 0x998]
mov eax, dword [ebp - 0x9a0]
add esp, 8
call fcn.004c0890
mov eax, 0x1e
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004f6bad
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 0x998]
lea ecx, [ebp - 0x9a8]
push ecx
lea edx, [ebp - 0x994]
push edx
push esi
mov dword [ebp - 0x9a8], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x4d83bc
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, dword [ebp - 0x9a0]
push ebx
mov edi, eax
call fcn.004e1010
add esp, 4
push eax
mov eax, dword [ebp - 0x99c]
push str.getsockname___failed:__s
push eax
call fcn.004c1e70
add esp, 0xc
mov eax, ebx
call fcn.004c0890
mov eax, 0x1e
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004f6bad
mov esp, ebp
pop ebp
ret
push 1
push esi
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x4d83f2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, dword [ebp - 0x9a0]
push ebx
mov edi, eax
call fcn.004e1010
mov ecx, dword [ebp - 0x99c]
add esp, 4
push eax
push str.socket_failure:__s
push ecx
jmp 0x4d828e
mov ecx, dword [ebp - 0x9a4]
push 0x100
lea esi, [ebp - 0x10c]
call fcn.004c0a30
mov esi, dword [ebp - 0x9c4]
add esp, 4
cmp esi, 2
je 0x4d858c
mov cx, word [ebp - 0x994]
mov ebx, dword [ebp - 0x9a0]
cmp dword [ebx + 0x1fc], 0
jne 0x4d8434
test esi, esi
je 0x4d846b
cmp esi, 1
jne 0x4d843f
cmp cx, 2
jne 0x4d846b
movzx eax, cx
sub eax, 2
jne 0x4d846b
mov edx, dword [ebp - 0x992]
push edx
call dword [sym.imp.WS2_32.dll_ntohs]
movzx edi, ax
test esi, esi
je 0x4d8476
cmp esi, 1
je 0x4d84ef
mov cx, word [ebp - 0x994]
inc esi
cmp esi, 2
jne 0x4d8421
jmp 0x4d8592
mov eax, dword [ebp - 0x9b0]
xor edx, edx
cmp word [ebp - 0x994], 2
push edi
setne dl
lea ecx, [ebp - 0x10c]
push ecx
inc edx
push edx
push str.EPRT
push str._s__d_s_hu
push eax
call fcn.004e3420
mov edi, eax
add esp, 0x18
test edi, edi
je 0x4d8598
push edi
call sym.kometabrowsercmd.exe_curl_easy_strerror
mov ecx, dword [ebp - 0x99c]
add esp, 4
push eax
push str.Failure_sending_EPRT_command:__s
push ecx
call fcn.004c1e70
mov esi, dword [ebp - 0x998]
add esp, 0xc
mov eax, ebx
call fcn.004c0890
mov edx, dword [ebp - 0x9b0]
mov dword [edx + 0x68], 1
xor eax, eax
jmp 0x4d85ce
lea ecx, [ebp - 0x914]
lea edx, [ebp - 0x10c]
jmp 0x4d8500
mov al, byte [edx]
test al, al
je 0x4d8515
cmp al, 0x2e
jne 0x4d850f
mov byte [ecx], 0x2c
jmp 0x4d8511
mov byte [ecx], al
inc ecx
inc edx
jne 0x4d8500
mov eax, edi
mov edx, edi
and edx, 0xff
push edx
shr eax, 8
push eax
push str.__d__d
push 0x14
push ecx
mov byte [ecx], 0
call sym.kometabrowsercmd.exe_curl_msnprintf
mov ecx, dword [ebp - 0x9b0]
add esp, 0x14
lea eax, [ebp - 0x914]
push eax
push str.PORT
push 0x5548e8
push ecx
call fcn.004e3420
mov edi, eax
add esp, 0x10
test edi, edi
je 0x4d8598
push edi
call sym.kometabrowsercmd.exe_curl_easy_strerror
mov edx, dword [ebp - 0x99c]
add esp, 4
push eax
push str.Failure_sending_PORT_command:__s
push edx
call fcn.004c1e70
mov esi, dword [ebp - 0x998]
add esp, 0xc
mov eax, ebx
call fcn.004c0890
xor eax, eax
jmp 0x4d85ce
mov ebx, dword [ebp - 0x9a0]
mov edi, dword [ebp - 0x9c0]
mov eax, dword [ebp - 0x9b0]
mov dword [eax + 0x68], esi
mov esi, dword [ebx + 0x144]
cmp esi, 0xffffffff
je 0x4d85b3
mov eax, ebx
call fcn.004c0890
mov ecx, dword [ebp - 0x998]
mov dword [ebx + 0x144], ecx
mov dword [ebx + 0x1e0], 1
mov eax, 0x1c
mov ecx, ebx
call fcn.004d7c20
mov ecx, dword [ebp - 8]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004f6bad
mov esp, ebp
pop ebp
ret