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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9ac
mov eax, dword [0x494ce8]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, dword [eax]
xor ebx, ebx
push 0xff
lea edx, [ebp - 0x103]
push ebx
push edx
mov dword [ebp - 0x99c], eax
mov dword [ebp - 0x9ac], ecx
mov dword [ebp - 0x9a8], ebx
mov dword [ebp - 0x98c], edi
mov byte [ebp - 0x104], bl
call fcn.0045d070
mov esi, dword [edi + 0x354]
mov dword [ebp - 0x9a4], ebx
mov eax, dword [edi + 0x354]
add esp, 0xc
mov dword [ebp - 0x9a0], ebx
mov dword [ebp - 0x998], ebx
test eax, eax
je 0x417ae7
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x417990
sub eax, edx
cmp eax, 1
jbe 0x417ae7
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4179a7
sub eax, edx
cmp eax, 0x16
jae 0x4179bc
mov eax, 0x16
jmp 0x4179ca
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4179c1
sub eax, edx
inc eax
push 1
push eax
call dword [0x4944b4]
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x4179f1
pop edi
pop esi
lea eax, [ebx + 0x1b]
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045d571
mov esp, ebp
pop ebp
ret
cmp byte [esi], 0x3a
jne 0x417aa5
mov edi, esi
test edi, edi
je 0x417a6f
push 0x3a
push edi
call fcn.0045e6c0
mov esi, eax
add esp, 8
test esi, esi
je 0x417a6f
push 0xa
lea ecx, [esi + 1]
push 0
push ecx
call fcn.0045ef83
push eax
call fcn.0043c060
movzx edi, ax
push 0x2d
push esi
mov dword [ebp - 0x9a0], edi
call fcn.0045e6c0
xor esi, esi
add esp, 0x18
cmp eax, esi
je 0x417adc
push 0xa
inc eax
push esi
push eax
call fcn.0045ef83
push eax
call fcn.0043c060
movzx eax, ax
add esp, 0x10
mov dword [ebp - 0x998], eax
cmp di, ax
jbe 0x417a6f
mov dword [ebp - 0x998], esi
mov dword [ebp - 0x9a0], esi
cmp byte [ebx], 0
je 0x417ae7
mov esi, dword [ebp - 0x99c]
mov ecx, dword [esi + 0x38]
mov edx, dword [ecx + 4]
push 0x401
lea eax, [ebp - 0x508]
push eax
push ebx
push edx
call fcn.00423130
add esp, 0x10
test eax, eax
jne 0x417b7f
mov eax, ebx
jmp 0x417b85
push 0x3a
push esi
call fcn.0045e6c0
mov edi, eax
add esp, 8
test edi, edi
je 0x417ac8
sub eax, esi
push eax
push esi
push ebx
call fcn.00460e80
add esp, 0xc
jmp 0x4179fc
mov edx, ebx
mov eax, esi
sub edx, esi
mov edi, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x417ad0
jmp 0x417a6f
movzx edx, di
mov dword [ebp - 0x998], edx
jmp 0x417a6f
mov esi, dword [ebp - 0x99c]
mov edx, dword [esi + 0x12c]
lea eax, [ebp - 0x994]
push eax
lea ecx, [ebp - 0x988]
push ecx
push edx
mov dword [ebp - 0x994], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x417b5c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.00431050
push eax
mov eax, dword [ebp - 0x98c]
push str.getsockname___failed:__s
push eax
call fcn.0042d160
add esp, 0x14
test ebx, ebx
je 0x417b46
push ebx
call dword [0x4944a8]
add esp, 4
pop edi
pop esi
mov eax, 0x1e
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045d571
mov esp, ebp
pop ebp
ret
movzx eax, word [ebp - 0x988]
push 0x401
lea ecx, [ebp - 0x508]
push ecx
lea edx, [ebp - 0x984]
push edx
push eax
call fcn.00423bc0
add esp, 0x10
lea eax, [ebp - 0x508]
lea ecx, [ebp - 0x9a4]
push ecx
push 0
push eax
push esi
call fcn.0041dcf0
add esp, 0x10
cmp eax, 1
jne 0x417bad
lea edx, [ebp - 0x9a4]
push edx
push esi
call fcn.0041e2c0
add esp, 8
mov eax, dword [ebp - 0x9a4]
test eax, eax
je 0x417bcb
mov esi, dword [eax]
push eax
mov eax, dword [ebp - 0x98c]
push eax
call fcn.0041ded0
add esp, 8
jmp 0x417bcd
xor esi, esi
test ebx, ebx
je 0x417bdb
push ebx
call dword [0x4944a8]
add esp, 4
test esi, esi
jne 0x417c07
mov ecx, dword [ebp - 0x98c]
push str.Curl_resolv_failed__we_can_not_recover_
push ecx
call fcn.0042d160
add esp, 8
pop edi
lea eax, [esi + 0x1e]
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045d571
mov esp, ebp
pop ebp
ret
mov edi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
lea ecx, [ecx]
cmp dword [esi + 8], 0
jne 0x417c22
mov edx, dword [ebp - 0x99c]
mov eax, dword [edx + 0x70]
mov dword [esi + 8], eax
mov ecx, dword [esi + 0xc]
mov edx, dword [esi + 8]
mov eax, dword [esi + 4]
push ecx
push edx
push eax
call dword [sym.imp.WS2_32.dll_socket]
mov ebx, eax
mov dword [ebp - 0x990], ebx
cmp ebx, 0xffffffff
jne 0x417c80
call edi
mov esi, dword [esi + 0x1c]
test esi, esi
jne 0x417c10
mov ecx, dword [ebp - 0x99c]
push eax
push ecx
call fcn.00431050
mov edx, dword [ebp - 0x98c]
push eax
push str.socket_failure:__s
push edx
call fcn.0042d160
add esp, 0x14
pop edi
lea eax, [esi + 0x1e]
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045d571
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 0x18]
push eax
push ecx
lea edx, [ebp - 0x988]
push edx
call fcn.0045c990
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x994], eax
mov eax, dword [ebp - 0x9a0]
add esp, 0xc
movzx edi, ax
cmp ax, word [ebp - 0x998]
ja 0x417e10
mov ebx, dword [ebp - 0x99c]
lea esp, [esp]
cmp word [ebp - 0x988], 2
jne 0x417cd8
push edi
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x986], ax
mov ecx, dword [ebp - 0x994]
mov eax, dword [ebp - 0x990]
push ecx
lea edx, [ebp - 0x988]
push edx
push eax
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x417e01
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2741
jne 0x417d5a
push eax
push ebx
call fcn.00431050
mov edx, dword [ebp - 0x98c]
push eax
movzx ecx, di
push ecx
push str.bind_port_hu__failed:__s
push edx
call fcn.0042d160
mov edx, dword [ebx + 0x12c]
add esp, 0x18
lea eax, [ebp - 0x994]
push eax
lea ecx, [ebp - 0x988]
push ecx
push edx
mov dword [ebp - 0x994], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x417d79
movzx edi, word [ebp - 0x9a0]
jmp 0x417d67
cmp eax, 0x2740
je 0x417d66
cmp eax, 0xd
jne 0x417dbe
inc edi
cmp di, word [ebp - 0x998]
jbe 0x417cc0
jmp 0x417e0a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push ebx
call fcn.00431050
push eax
mov eax, dword [ebp - 0x98c]
push str.getsockname___failed:__s
push eax
call fcn.0042d160
mov ecx, dword [ebp - 0x990]
add esp, 0x14
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
mov eax, 0x1e
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045d571
mov esp, ebp
pop ebp
ret
push eax
push ebx
call fcn.00431050
push eax
mov eax, dword [ebp - 0x98c]
movzx edx, di
push edx
push str.bind_port_hu__failed:__s
push eax
call fcn.0042d160
mov ecx, dword [ebp - 0x990]
add esp, 0x18
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
mov eax, 0x1e
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045d571
mov esp, ebp
pop ebp
ret
cmp di, word [ebp - 0x998]
jbe 0x417e41
mov ebx, dword [ebp - 0x990]
mov edx, dword [ebp - 0x98c]
push str.bind___failed__we_ran_out_of_ports_
push edx
call fcn.0042d160
add esp, 8
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
mov eax, 0x1e
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045d571
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp - 0x990]
lea eax, [ebp - 0x994]
push eax
lea ecx, [ebp - 0x988]
push ecx
push edi
mov dword [ebp - 0x994], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x417ea9
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push ebx
call fcn.00431050
mov edx, dword [ebp - 0x98c]
push eax
push str.getsockname___failed:__s
push edx
call fcn.0042d160
add esp, 0x14
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
mov eax, 0x1e
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045d571
mov esp, ebp
pop ebp
ret
push 1
push edi
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x417ef5
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push ebx
call fcn.00431050
push eax
mov eax, dword [ebp - 0x98c]
push str.socket_failure:__s
push eax
call fcn.0042d160
add esp, 0x14
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
mov eax, 0x1e
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045d571
mov esp, ebp
pop ebp
ret
push 0x100
lea ecx, [ebp - 0x104]
push ecx
push esi
call fcn.0041da80
mov edi, dword [ebp - 0x9ac]
add esp, 0xc
cmp edi, 2
je 0x417f6a
mov cx, word [ebp - 0x988]
lea esp, [esp]
cmp dword [ebx + 0x1d8], 0
jne 0x417f2d
test edi, edi
je 0x417f64
cmp edi, 1
jne 0x417f38
cmp cx, 2
jne 0x417f64
movzx eax, cx
sub eax, 2
jne 0x417f64
mov edx, dword [ebp - 0x986]
push edx
call dword [sym.imp.WS2_32.dll_ntohs]
movzx esi, ax
test edi, edi
je 0x417fbb
cmp edi, 1
je 0x418006
mov cx, word [ebp - 0x988]
inc edi
cmp edi, 2
jne 0x417f20
mov esi, dword [ebp - 0x9a8]
mov dword [ebx + 0x414], edi
mov eax, dword [ebx + 0x130]
cmp eax, 0xffffffff
je 0x417f88
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [ebp - 0x990]
pop edi
mov dword [ebx + 0x130], ecx
mov dword [ebx + 0x1b8], 1
mov eax, esi
pop esi
mov dword [ebx + 0x420], 0x1c
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045d571
mov esp, ebp
pop ebp
ret
xor edx, edx
cmp word [ebp - 0x988], 2
push esi
setne dl
lea ecx, [ebp - 0x104]
push ecx
lea eax, [ebx + 0x3b0]
inc edx
push edx
push str.EPRT
push str._s__d_s_hu
push eax
call fcn.00429b60
mov esi, eax
add esp, 0x18
test esi, esi
je 0x417f70
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045d571
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x908]
lea edx, [ebp - 0x104]
mov al, byte [edx]
test al, al
je 0x418027
cmp al, 0x2e
jne 0x418021
mov byte [ecx], 0x2c
jmp 0x418023
mov byte [ecx], al
inc ecx
inc edx
jne 0x418012
mov eax, esi
mov edx, esi
and edx, 0xff
push edx
shr eax, 8
push eax
push str.__d__d
push 0x14
push ecx
mov byte [ecx], 0
call dword [0x48e090]
lea eax, [ebp - 0x908]
push eax
push str.PORT
lea eax, [ebx + 0x3b0]
push str._s__s
push eax
call fcn.00429b60
mov esi, eax
add esp, 0x24
test esi, esi
je 0x417f70
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0045d571
mov esp, ebp
pop ebp
ret