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

Disassembly:
sub esp, 0x658
mov eax, dword [0x1006c3ac]
xor eax, esp
mov dword [esp + 0x654], eax
push ebx
push ebp
push esi
mov esi, dword [esp + 0x668]
push edi
mov edi, dword [esp + 0x670]
push 0x2e
mov eax, dword [esi + 0x18]
mov dword [esp + 0x18], eax
add eax, 0x350
mov dword [esp + 0x30], eax
lea eax, [esp + 0xbd]
push 0
push eax
mov dword [esp + 0x24], esi
mov dword [esp + 0x34], 0xffffffff
mov byte [esp + 0xc4], 0
call sub.VCRUNTIME140.dll_memset
mov ebp, dword [esi + 0x50c]
add esp, 0xc
xor ebx, ebx
mov dword [esp + 0x34], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov byte [esp + 0x13], 1
mov dword [esp + 0x30], 0
test ebp, ebp
je 0x1003787e
mov ecx, ebp
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x100376a8
sub ecx, edx
cmp ecx, 1
jbe 0x1003787e
mov al, byte [ebp]
cmp al, 0x5b
jne 0x100376f0
lea ebx, [ebp + 1]
mov esi, ebx
push 0x5d
push esi
call sub.VCRUNTIME140.dll_strchr
mov ebp, eax
add esp, 8
xor eax, eax
test ebp, ebp
cmove ebx, eax
mov eax, ebp
mov dword [esp + 0x30], ebx
sub eax, esi
mov esi, dword [esp + 0x18]
mov ebx, ebp
neg ebx
sbb ebx, ebx
and ebx, eax
jmp 0x1003772a
cmp al, 0x3a
je 0x10037730
push 0x3a
push ebp
call sub.VCRUNTIME140.dll_strchr
mov ebx, eax
mov dword [esp + 0x28], eax
add esp, 8
mov dword [esp + 0x30], ebp
test ebx, ebx
je 0x1003778b
lea eax, [esp + 0x40]
sub ebx, ebp
push eax
push ebp
push 0x17
call fcn.1002f500
add esp, 0xc
lea ebp, [eax - 1]
neg ebp
sbb ebp, ebp
and ebp, dword [esp + 0x20]
xor edx, edx
test ebp, ebp
je 0x1003779f
push 0x3a
push ebp
call sub.VCRUNTIME140.dll_strchr
add esp, 8
mov dword [esp + 0x20], eax
xor ebp, ebp
xor edx, edx
test eax, eax
je 0x100377a1
push 0xa
push edx
inc eax
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_strtoul]
push eax
call fcn.1001add0
push 0x2d
push dword [esp + 0x34]
movzx ebp, ax
call sub.VCRUNTIME140.dll_strchr
add esp, 0x18
test eax, eax
je 0x10037787
push 0xa
inc eax
push 0
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_strtoul]
push eax
call fcn.1001add0
add esp, 0x10
movzx edx, ax
jmp 0x100377a1
mov edx, ebp
jmp 0x100377a1
mov ebx, ebp
lea ecx, [ebx + 1]
mov al, byte [ebx]
inc ebx
test al, al
jne 0x10037790
sub ebx, ecx
xor ebp, ebp
xor edx, edx
jmp 0x100377a1
xor ebp, ebp
xor ecx, ecx
movzx eax, dx
cmp bp, dx
cmovbe ecx, eax
movzx eax, cx
xor ecx, ecx
cmp bp, dx
mov dword [esp + 0x1c], eax
movzx eax, bp
cmovbe ecx, eax
movzx ebp, cx
test ebx, ebx
je 0x1003786d
cmp ebx, 0x32
jae 0x10037d57
push ebx
push dword [esp + 0x34]
lea eax, [esp + 0xf0]
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov byte [esp + ebx + 0xe8], 0
mov ebx, dword [esp + 0x14]
lea eax, [esp + 0x260]
push 0x401
push eax
lea eax, [esp + 0xf0]
push eax
mov eax, dword [ebx + 0x24]
push dword [ebx + 0x42c]
add eax, 0x10
push eax
call fcn.10056530
add esp, 4
push eax
mov eax, dword [ebx + 0x24]
push dword [eax]
call fcn.1000d6f0
add esp, 0x18
sub eax, 0
je 0x10037847
sub eax, 1
je 0x10037d57
sub eax, 1
jne 0x10037850
lea ebx, [esp + 0x260]
jmp 0x10037852
lea ebx, [esp + 0xe8]
jmp 0x10037852
xor ebx, ebx
mov eax, ebp
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x1c]
movzx eax, ax
mov dword [esp + 0x1c], eax
test ebx, ebx
jne 0x1003791d
jmp 0x1003787e
mov eax, ebp
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x1c]
movzx eax, ax
mov dword [esp + 0x1c], eax
mov ebp, dword [esp + 0x14]
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x3c]
mov dword [esp + 0x28], 0x80
push eax
push dword [ebp + 0x108]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x100378d1
push pe_nt_image_headers32
lea eax, [esp + 0x164]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.10003fe0
push eax
push str.getsockname___failed:__s
push esi
call fcn.100188b0
add esp, 0x18
jmp 0x10037d5b
mov ax, word [esp + 0x38]
cmp ax, 0x17
je 0x100378e5
lea ecx, [esp + 0x3c]
movzx eax, ax
jmp 0x100378ee
lea ecx, [esp + 0x40]
mov eax, 0x17
push 0x401
lea edx, [esp + 0x264]
movzx eax, ax
push edx
push ecx
push eax
call fcn.1004ad60
add esp, 0x10
test eax, eax
je 0x10037d5b
xor al, al
lea ebx, [esp + 0x260]
mov byte [esp + 0x13], al
lea eax, [esp + 0x34]
push eax
push 0
push 0
push ebx
push esi
call fcn.10021940
add esp, 0x14
cmp eax, 1
jne 0x10037943
lea eax, [esp + 0x34]
push eax
push esi
call fcn.1000d900
add esp, 8
mov eax, dword [esp + 0x34]
test eax, eax
je 0x10037d48
mov ebp, dword [eax]
push eax
push esi
call fcn.10021ee0
add esp, 8
test ebp, ebp
je 0x10037d48
mov ebx, dword [sym.imp.WS2_32.dll_WSAGetLastError]
nop dword [eax]
lea eax, [esp + 0x28]
push eax
mov eax, dword [esp + 0x18]
movzx eax, byte [eax + 0x436]
push eax
push 0
push ebp
push esi
call fcn.100468b0
add esp, 0x14
test eax, eax
je 0x100379c1
call ebx
mov ebp, dword [ebp + 0x1c]
test ebp, ebp
jne 0x10037970
push pe_nt_image_headers32
lea ecx, [esp + 0x164]
push ecx
push eax
call fcn.10003fe0
push eax
push str.socket_failure:__s
push esi
call fcn.100188b0
add esp, 0x18
jmp 0x10037d57
push dword [ebp + 0x10]
lea eax, [esp + 0x3c]
push dword [ebp + 0x18]
push eax
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebp + 0x10]
add esp, 0xc
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x20]
movzx esi, ax
cmp ax, word [esp + 0x1c]
ja 0x10037d34
mov eax, dword [sym.imp.WS2_32.dll_htons]
push esi
call eax
push dword [esp + 0x24]
mov word [esp + 0x3e], ax
lea eax, [esp + 0x3c]
push eax
push dword [esp + 0x30]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x10037ade
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov cl, byte [esp + 0x13]
test cl, cl
je 0x10037a94
cmp eax, 0x2741
jne 0x10037a94
push pe_nt_image_headers32
lea eax, [esp + 0x164]
push eax
push 0x2741
call fcn.10003fe0
push eax
movzx eax, si
push eax
push str.bind_port_hu__on_non_local_address_failed:__s
push ebx
call fcn.10018980
add esp, 0x1c
mov dword [esp + 0x24], 0x80
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x3c]
push eax
mov eax, dword [esp + 0x1c]
push dword [eax + 0x108]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x10037b09
mov eax, dword [esp + 0x20]
movzx esi, ax
xor al, al
mov byte [esp + 0x13], al
jmp 0x100379f1
cmp eax, 0x2740
je 0x10037aa0
cmp eax, 0xd
jne 0x10037aaf
inc esi
mov byte [esp + 0x13], cl
movzx eax, si
mov esi, eax
jmp 0x100379e6
push pe_nt_image_headers32
lea ecx, [esp + 0x164]
push ecx
push eax
call fcn.10003fe0
push eax
movzx eax, si
push eax
push str.bind_port_hu__failed:__s
push ebx
call fcn.100188b0
mov ebp, dword [esp + 0x30]
add esp, 0x1c
jmp 0x10037d5f
cmp si, word [esp + 0x1c]
ja 0x10037d34
lea eax, [esp + 0x24]
mov dword [esp + 0x24], 0x80
push eax
lea eax, [esp + 0x3c]
push eax
push dword [esp + 0x30]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x10037b3a
push pe_nt_image_headers32
lea eax, [esp + 0x164]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.10003fe0
push eax
push str.getsockname___failed:__s
push ebx
call fcn.100188b0
mov ebp, dword [esp + 0x2c]
add esp, 0x18
jmp 0x10037d5f
push 1
push dword [esp + 0x2c]
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x10037b7b
push pe_nt_image_headers32
lea eax, [esp + 0x164]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.10003fe0
push eax
push str.socket_failure:__s
push ebx
call fcn.100188b0
mov ebp, dword [esp + 0x2c]
add esp, 0x18
jmp 0x10037d5f
push 0x2f
lea eax, [esp + 0xbc]
push eax
push ebp
call fcn.100218f0
mov eax, dword [esp + 0x20]
add esp, 0xc
cmp byte [eax + 0x1ba], 0
jne 0x10037bab
cmp byte [eax + 0x1b4], 0
je 0x10037bab
mov byte [eax + 0x1ba], 1
cmp edi, 2
je 0x10037c0a
mov esi, dword [sym.imp.WS2_32.dll_ntohs]
mov cx, word [esp + 0x38]
nop dword [eax + eax]
cmp byte [eax + 0x1ba], 0
jne 0x10037bcd
test edi, edi
je 0x10037c04
cmp edi, 1
jne 0x10037bd8
cmp cx, 2
jne 0x10037c04
movzx eax, cx
sub eax, 2
je 0x10037be5
sub eax, 0x15
jne 0x10037c00
push dword [esp + 0x3a]
call esi
movzx ebp, ax
test edi, edi
je 0x10037cde
cmp edi, 1
je 0x10037c4a
mov cx, word [esp + 0x38]
mov eax, dword [esp + 0x14]
inc edi
cmp edi, 2
jne 0x10037bc0
mov ebp, dword [esp + 0x2c]
lea eax, [esp + 0x28]
mov dword [ebp + 0xa0], edi
mov ebp, dword [esp + 0x14]
push eax
push 1
push ebp
push ebx
call fcn.10046660
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x10037d64
mov eax, dword [ebx + 0x18]
mov dword [esp + 0x28], 0xffffffff
mov byte [eax + 0x3fe], 0x1c
jmp 0x10037d6e
lea edx, [esp + 0x11c]
mov ebx, 0x2c
lea esi, [esp + 0xb8]
nop dword [eax]
mov cl, byte [esi]
test cl, cl
je 0x10037c77
cmp cl, 0x2e
movzx eax, cl
cmove eax, ebx
mov byte [edx], al
inc edx
add esi, 1
jne 0x10037c60
movzx ecx, bp
movzx eax, cl
push eax
shr ecx, 8
push ecx
push str.__d__d
push 0x14
push edx
mov byte [edx], 0
call fcn.1001cf80
mov ebp, dword [esp + 0x40]
lea eax, [esp + 0x130]
mov ebx, dword [esp + 0x2c]
push eax
push str.PORT
push 0x10062c30
push ebp
push ebx
call fcn.10054fa0
mov esi, eax
add esp, 0x28
test esi, esi
je 0x10037c0e
push esi
call fcn.10004150
push eax
push str.Failure_sending_PORT_command:__s
push ebx
call fcn.100188b0
mov ebp, dword [esp + 0x24]
add esp, 0x10
jmp 0x10037d64
movzx eax, bp
mov ebp, dword [esp + 0x2c]
push eax
lea eax, [esp + 0xbc]
push eax
xor eax, eax
cmp word [esp + 0x40], 2
setne al
inc eax
push eax
push str.EPRT
push str._s__d_s_hu
push ebp
push ebx
call fcn.10054fa0
mov esi, eax
add esp, 0x1c
test esi, esi
je 0x10037c0e
push esi
call fcn.10004150
push eax
push str.Failure_sending_EPRT_command:__s
push ebx
call fcn.100188b0
mov ebp, dword [esp + 0x24]
add esp, 0x10
jmp 0x10037d64
push str.bind___failed__we_ran_out_of_ports
push ebx
call fcn.100188b0
mov ebp, dword [esp + 0x1c]
add esp, 8
jmp 0x10037d5f
push ebx
push str.failed_to_resolve_the_address_provided_to_PORT:__s
push esi
call fcn.100188b0
add esp, 0xc
mov ebp, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
mov esi, 0x1e
mov eax, dword [ebx + 0x18]
mov byte [eax + 0x3fe], 0
mov eax, dword [esp + 0x28]
cmp eax, 0xffffffff
je 0x10037d82
push eax
push ebp
push ebx
call fcn.10046880
add esp, 0xc
mov ecx, dword [esp + 0x664]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.10058fa8
add esp, 0x658
ret