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

Disassembly:
sub esp, 0x624
mov eax, dword [0x100b9550]
xor eax, esp
mov dword [esp + 0x620], eax
push ebx
push ebp
mov ebp, dword [esp + 0x630]
push esi
push edi
mov edi, dword [esp + 0x63c]
mov ebx, dword [ebp + 0x18]
push 0x2e
push 0
mov dword [esp + 0x3c], ebp
lea eax, [ebx + 0x398]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x34], eax
lea eax, [esp + 0xc1]
push eax
mov dword [esp + 0x28], 0xffffffff
mov byte [esp + 0xc4], 0
call fcn.1006a960
mov esi, dword [ebp + 0x514]
add esp, 0xc
mov dword [esp + 0x30], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x24], 0
mov byte [esp + 0x17], 1
mov dword [esp + 0x20], 0
test esi, esi
je 0x100459f2
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10045817
sub ecx, edx
cmp ecx, 1
jbe 0x100459f2
mov ecx, esi
lea edx, [ecx + 1]
mov edi, edi
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10045830
sub ecx, edx
cmp ecx, 0x41
jae 0x10045845
mov ecx, 0x41
jmp 0x10045859
mov ecx, esi
lea edx, [ecx + 1]
lea ebx, [ebx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10045850
sub ecx, edx
lea eax, [ecx + 1]
push eax
push 1
call dword [0x100b9044]
add esp, 8
mov dword [esp + 0x20], eax
test eax, eax
jne 0x10045878
lea esi, [eax + 0x1b]
jmp 0x10045eba
mov al, byte [esi]
cmp al, 0x5b
jne 0x1004589c
push 0x5d
push esi
call fcn.10068f80
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x1004599d
lea ecx, [esi + 1]
sub eax, ecx
push eax
push ecx
jmp 0x100458fa
cmp al, 0x3a
jne 0x100458a4
mov ebx, esi
jmp 0x10045906
push 0x3a
push esi
call fcn.10068f80
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x10045983
lea eax, [esp + 0x40]
push eax
push esi
push 0x17
call fcn.100393f0
add esp, 0xc
cmp eax, 1
jne 0x100458f4
mov ecx, dword [esp + 0x20]
xor ebx, ebx
mov dword [esp + 0x24], 0
sub ecx, esi
mov dword [esp + 0x28], ebx
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [ecx + esi - 1], al
test al, al
jne 0x100458e2
jmp 0x1004599d
mov eax, ebx
sub eax, esi
push eax
push esi
push dword [esp + 0x28]
call fcn.1006b7c0
add esp, 0xc
test ebx, ebx
je 0x1004599d
push 0x3a
push ebx
call fcn.10068f80
mov esi, eax
add esp, 8
test esi, esi
je 0x1004599d
push 0xa
lea eax, [esi + 1]
push 0
push eax
call fcn.1006bdd9
push eax
call fcn.10022cd0
movzx ebx, ax
push 0x2d
push esi
mov dword [esp + 0x40], ebx
call fcn.10068f80
add esp, 0x18
test eax, eax
je 0x1004597a
push 0xa
inc eax
push 0
push eax
call fcn.1006bdd9
push eax
call fcn.10022cd0
movzx edx, ax
add esp, 0x10
mov dword [esp + 0x24], edx
cmp bx, dx
jbe 0x1004599d
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], 0
jmp 0x1004599d
movzx eax, bx
mov dword [esp + 0x24], eax
jmp 0x1004599d
mov ecx, dword [esp + 0x20]
sub ecx, esi
lea esp, [esp]
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [ecx + esi - 1], al
test al, al
jne 0x10045990
mov esi, dword [esp + 0x20]
mov ebx, dword [esp + 0x10]
cmp byte [esi], 0
je 0x100459f2
push 0x401
lea eax, [esp + 0x230]
push eax
mov eax, dword [ebx + 0x60]
push esi
push dword [ebx + 0x464]
add eax, 0x10
push eax
call fcn.10061a10
add esp, 4
push eax
mov eax, dword [ebx + 0x60]
push dword [eax]
call fcn.10061a00
add esp, 0x18
sub eax, 0
je 0x10045a8f
dec eax
je 0x10045eb5
dec eax
je 0x10045a88
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0x80
push eax
lea eax, [esp + 0x3c]
push eax
push dword [ebx + 0x140]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x10045a41
push 0x100
lea eax, [esp + 0x130]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.100338e0
push eax
push str.getsockname___failed:__s
push ebp
call fcn.10020190
add esp, 0x18
jmp 0x10045eb5
mov ax, word [esp + 0x38]
push 0x401
cmp ax, 0x17
je 0x10045a64
lea ecx, [esp + 0x230]
movzx eax, ax
push ecx
lea ecx, [esp + 0x44]
push ecx
push eax
jmp 0x10045a73
lea eax, [esp + 0x230]
push eax
lea eax, [esp + 0x48]
push eax
push 0x17
call fcn.100561a0
add esp, 0x10
test eax, eax
je 0x10045eb5
mov byte [esp + 0x17], 0
lea esi, [esp + 0x22c]
lea eax, [esp + 0x30]
push eax
push 0
push 0
push esi
push ebp
call fcn.10029cc0
add esp, 0x14
cmp eax, 1
jne 0x10045ab5
lea eax, [esp + 0x30]
push eax
push ebp
call fcn.10013b50
add esp, 8
mov eax, dword [esp + 0x30]
test eax, eax
je 0x10045ea2
mov ebx, dword [eax]
push eax
push ebp
call fcn.1002a080
add esp, 8
test ebx, ebx
je 0x10045ea2
xor esi, esi
lea eax, [esp + 0x1c]
push eax
mov eax, dword [esp + 0x14]
movzx eax, byte [eax + 0x46f]
push eax
push 0
push ebx
push ebp
call fcn.10054f30
add esp, 0x14
test eax, eax
je 0x10045b09
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, dword [ebx + 0x1c]
mov esi, eax
test ebx, ebx
jne 0x10045ad7
jmp 0x10045b0d
test ebx, ebx
jne 0x10045b34
push 0x100
lea eax, [esp + 0x130]
push eax
push esi
call fcn.100338e0
push eax
push str.socket_failure:__s
push ebp
call fcn.10020190
add esp, 0x18
jmp 0x10045eb1
push dword [ebx + 0x10]
lea eax, [esp + 0x3c]
push dword [ebx + 0x18]
push eax
call fcn.10067bf0
mov eax, dword [ebx + 0x10]
add esp, 0xc
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x28]
cmp ax, word [esp + 0x24]
movzx esi, ax
ja 0x10045e92
mov eax, dword [sym.imp.WS2_32.dll_htons]
push esi
call eax
push dword [esp + 0x18]
mov word [esp + 0x3e], ax
lea eax, [esp + 0x3c]
push eax
push dword [esp + 0x24]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x10045c48
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp byte [esp + 0x17], 0
je 0x10045c06
cmp eax, 0x2741
jne 0x10045c06
push 0x100
lea eax, [esp + 0x130]
push eax
push 0x2741
call fcn.100338e0
push eax
movzx eax, si
push eax
push str.bind_port_hu__on_non_local_address_failed:__s
push ebp
call fcn.10020260
add esp, 0x1c
mov dword [esp + 0x18], 0x80
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x3c]
push eax
mov eax, dword [esp + 0x18]
push dword [eax + 0x140]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x10045c73
mov eax, dword [esp + 0x28]
movzx esi, ax
cmp si, word [esp + 0x24]
mov byte [esp + 0x17], 0
jmp 0x10045b5a
cmp eax, 0x2740
je 0x10045c12
cmp eax, 0xd
jne 0x10045c1d
inc esi
cmp si, word [esp + 0x24]
jmp 0x10045b5a
push 0x100
lea ecx, [esp + 0x130]
push ecx
push eax
call fcn.100338e0
push eax
movzx eax, si
push eax
push str.bind_port_hu__failed:__s
push ebp
call fcn.10020190
add esp, 0x1c
jmp 0x10045eb1
cmp si, word [esp + 0x24]
ja 0x10045e92
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0x80
push eax
lea eax, [esp + 0x3c]
push eax
push dword [esp + 0x24]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x10045ca0
push 0x100
lea eax, [esp + 0x130]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.100338e0
push eax
push str.getsockname___failed:__s
push ebp
call fcn.10020190
add esp, 0x18
jmp 0x10045eb1
push 1
push dword [esp + 0x20]
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x10045cdd
push 0x100
lea eax, [esp + 0x130]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.100338e0
push eax
push str.socket_failure:__s
push ebp
call fcn.10020190
add esp, 0x18
jmp 0x10045eb1
push 0x2f
lea eax, [esp + 0xbc]
push eax
push ebx
call fcn.10029c70
mov eax, dword [esp + 0x1c]
add esp, 0xc
cmp byte [eax + 0x1f2], 0
jne 0x10045d0d
cmp byte [eax + 0x1ec], 0
je 0x10045d0d
mov byte [eax + 0x1f2], 1
cmp edi, 2
je 0x10045d6a
mov esi, dword [sym.imp.WS2_32.dll_ntohs]
mov cx, word [esp + 0x38]
lea ecx, [ecx]
cmp byte [eax + 0x1f2], 0
jne 0x10045d2d
test edi, edi
je 0x10045d64
cmp edi, 1
jne 0x10045d38
cmp cx, 2
jne 0x10045d64
movzx eax, cx
sub eax, 2
je 0x10045d45
sub eax, 0x15
jne 0x10045d60
push dword [esp + 0x3a]
call esi
movzx ebx, ax
test edi, edi
je 0x10045e3c
cmp edi, 1
je 0x10045daa
mov cx, word [esp + 0x38]
mov eax, dword [esp + 0x10]
inc edi
cmp edi, 2
jne 0x10045d20
mov ebx, dword [esp + 0x2c]
lea eax, [esp + 0x1c]
mov dword [ebx + 0x90], edi
mov ebx, dword [esp + 0x10]
push eax
push 1
push ebx
push ebp
call fcn.10054ce0
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x10045eba
mov eax, dword [ebp + 0x18]
mov dword [esp + 0x1c], 0xffffffff
mov byte [eax + 0x436], 0x1c
jmp 0x10045ec4
lea edx, [esp + 0xe8]
mov ebp, 0x2c
lea esi, [esp + 0xb8]
lea ecx, [ecx]
mov cl, byte [esi]
test cl, cl
je 0x10045dd5
cmp cl, 0x2e
movzx eax, cl
cmove eax, ebp
mov byte [edx], al
inc edx
inc esi
jne 0x10045dc0
movzx ecx, bx
movzx eax, cl
push eax
shr ecx, 8
push ecx
push str.__d__d
push 0x14
push edx
mov byte [edx], 0
call fcn.100279f0
mov ebx, dword [esp + 0x40]
lea eax, [esp + 0xfc]
mov ebp, dword [esp + 0x48]
push eax
push str.PORT
push 0x100a70b8
push ebx
push ebp
call fcn.100605e0
mov esi, eax
add esp, 0x28
test esi, esi
je 0x10045d6e
push esi
call fcn.10033a50
push eax
push str.Failure_sending_PORT_command:__s
push ebp
call fcn.10020190
mov ebx, dword [esp + 0x20]
add esp, 0x10
jmp 0x10045eba
movzx eax, bx
mov ebx, 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 ebx
push ebp
call fcn.100605e0
mov esi, eax
add esp, 0x1c
test esi, esi
je 0x10045d6e
push esi
call fcn.10033a50
push eax
push str.Failure_sending_EPRT_command:__s
push ebp
call fcn.10020190
mov ebx, dword [esp + 0x20]
add esp, 0x10
jmp 0x10045eba
push str.bind___failed__we_ran_out_of_ports
push ebp
call fcn.10020190
add esp, 8
jmp 0x10045eb1
push esi
push str.failed_to_resolve_the_address_provided_to_PORT:__s
push ebp
call fcn.10020190
add esp, 0xc
mov ebx, dword [esp + 0x10]
mov esi, 0x1e
mov eax, dword [ebp + 0x18]
mov byte [eax + 0x436], 0
mov eax, dword [esp + 0x1c]
cmp eax, 0xffffffff
je 0x10045ed8
push eax
push ebx
push ebp
call fcn.10054f00
add esp, 0xc
push dword [esp + 0x20]
call dword [0x100b9038]
mov ecx, dword [esp + 0x634]
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.100676f5
add esp, 0x624
ret