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

Disassembly:
sub esp, 0x9a4
mov eax, dword [0x507a74]
xor eax, esp
mov dword [esp + 0x9a0], eax
push ebp
push esi
push edi
mov edi, dword [ebx]
xor ebp, ebp
push 0xff
lea eax, [esp + 0xad]
push ebp
push eax
mov dword [esp + 0x30], ebp
mov dword [esp + 0x18], edi
mov byte [esp + 0xb4], 0
call fcn.004a92e0
mov esi, dword [edi + 0x2c4]
mov dword [esp + 0x2c], ebp
mov eax, dword [edi + 0x2c4]
add esp, 0xc
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x18], ebp
test eax, eax
je 0x418d25
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x418bd4
sub eax, edx
cmp eax, 1
jbe 0x418d25
mov eax, esi
lea edx, [eax + 1]
jmp 0x418bf0
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x418bf0
sub eax, edx
cmp eax, 0x16
jae 0x418c05
mov eax, 0x16
jmp 0x418c19
mov eax, esi
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x418c10
sub eax, edx
inc eax
push 1
push eax
call dword [0x5010a4]
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x418c47
pop edi
pop esi
lea eax, [ebp + 0x1b]
pop ebp
mov ecx, dword [esp + 0x9a0]
xor ecx, esp
call fcn.004a81b0
add esp, 0x9a4
ret
cmp byte [esi], 0x3a
jne 0x418ce3
mov edi, esi
test edi, edi
je 0x418cb1
push 0x3a
push edi
call fcn.004a9970
mov esi, eax
add esp, 8
test esi, esi
je 0x418cb1
push 0xa
lea edx, [esi + 1]
push 0
push edx
call fcn.004aa2b3
movzx edi, ax
push 0x2d
push esi
mov dword [esp + 0x30], edi
call fcn.004a9970
xor esi, esi
add esp, 0x14
cmp eax, esi
je 0x418d1c
push 0xa
inc eax
push esi
push eax
call fcn.004aa2b3
movzx eax, ax
add esp, 0xc
mov dword [esp + 0x18], eax
cmp di, ax
jbe 0x418cb1
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], esi
cmp byte [ebp], 0
je 0x418d25
mov edx, dword [ebx + 0x38]
mov eax, dword [edx + 4]
push 0x401
lea ecx, [esp + 0x1ac]
push ecx
push ebp
push eax
call fcn.0043da40
add esp, 0x10
test eax, eax
jne 0x418db3
mov eax, ebp
jmp 0x418dba
push 0x3a
push esi
call fcn.004a9970
mov edi, eax
add esp, 8
test edi, edi
je 0x418d08
mov ecx, edi
sub ecx, esi
push ecx
push esi
push ebp
call fcn.004aac10
add esp, 0xc
jmp 0x418c52
mov edx, ebp
mov eax, esi
sub edx, esi
mov edi, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x418d10
jmp 0x418cb1
movzx eax, di
mov dword [esp + 0x18], eax
jmp 0x418cb1
mov eax, dword [ebx + 0xd4]
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x2c]
push edx
push eax
mov dword [esp + 0x20], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x418d93
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push ebx
call fcn.00422d30
mov ecx, dword [esp + 0x14]
push eax
push str.getsockname___failed:__s
push ecx
call fcn.0040d820
add esp, 0x14
test ebp, ebp
je 0x418d76
push ebp
call dword [0x501098]
add esp, 4
pop edi
pop esi
mov eax, 0x1e
pop ebp
mov ecx, dword [esp + 0x9a0]
xor ecx, esp
call fcn.004a81b0
add esp, 0x9a4
ret
movzx ecx, word [esp + 0x28]
push 0x401
lea edx, [esp + 0x1ac]
push edx
lea eax, [esp + 0x34]
push eax
push ecx
call fcn.00412230
add esp, 0x10
lea eax, [esp + 0x1a8]
lea edx, [esp + 0x20]
push edx
push 0
push eax
push ebx
call fcn.00404820
add esp, 0x10
cmp eax, 1
jne 0x418dde
lea eax, [esp + 0x20]
push eax
push ebx
call fcn.00413c70
add esp, 8
mov eax, dword [esp + 0x20]
test eax, eax
je 0x418df8
mov ecx, dword [esp + 0xc]
mov esi, dword [eax]
push eax
push ecx
call fcn.00404a10
add esp, 8
jmp 0x418dfa
xor esi, esi
test ebp, ebp
je 0x418e08
push ebp
call dword [0x501098]
add esp, 4
test esi, esi
jne 0x418e39
mov edx, dword [esp + 0xc]
push str.Curl_resolv_failed__we_can_not_recover_
push edx
call fcn.0040d820
add esp, 8
pop edi
lea eax, [esi + 0x1e]
pop esi
pop ebp
mov ecx, dword [esp + 0x9a0]
xor ecx, esp
call fcn.004a81b0
add esp, 0x9a4
ret
mov ebp, dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, dword [sym.imp.WS2_32.dll_socket]
cmp dword [esi + 8], 0
jne 0x418e54
mov eax, dword [ebx + 0x80]
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 edi
mov dword [esp + 0x10], eax
cmp eax, 0xffffffff
jne 0x418ea9
call ebp
mov esi, dword [esi + 0x1c]
test esi, esi
jne 0x418e45
push eax
push ebx
call fcn.00422d30
mov ecx, dword [esp + 0x14]
push eax
push str.socket_failure:__s
push ecx
call fcn.0040d820
add esp, 0x14
pop edi
lea eax, [esi + 0x1e]
pop esi
pop ebp
mov ecx, dword [esp + 0x9a0]
xor ecx, esp
call fcn.004a81b0
add esp, 0x9a4
ret
mov edx, dword [esi + 0x10]
mov eax, dword [esi + 0x18]
push edx
push eax
lea ecx, [esp + 0x30]
push ecx
call fcn.004a8f60
mov ax, word [esp + 0x24]
mov edx, dword [esi + 0x10]
movzx edi, word [esp + 0x28]
add esp, 0xc
mov dword [esp + 0x14], edx
cmp word [esp + 0x1c], ax
ja 0x419023
lea ebx, [ebx]
cmp word [esp + 0x28], 2
jne 0x418ef4
push edi
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x2a], ax
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
push ecx
lea edx, [esp + 0x2c]
push edx
push eax
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x41901c
call fcn.004abb83
cmp dword [eax], 0x2741
jne 0x418f68
call ebp
push eax
push ebx
call fcn.00422d30
mov edx, dword [esp + 0x14]
push eax
movzx ecx, di
push ecx
push str.bind_port_i__failed:__s
push edx
call fcn.0040d820
mov edx, dword [ebx + 0xd4]
add esp, 0x18
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x2c]
push ecx
push edx
mov dword [esp + 0x20], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x418f90
movzx edi, word [esp + 0x1c]
jmp 0x418f80
call fcn.004abb83
cmp dword [eax], 0x2740
je 0x418f7f
call fcn.004abb83
cmp dword [eax], 0xd
jne 0x418fd4
inc edi
cmp di, word [esp + 0x18]
jbe 0x418ee0
jmp 0x419023
call ebp
push eax
push ebx
call fcn.00422d30
push eax
mov eax, dword [esp + 0x18]
push str.getsockname___failed:__s
push eax
call fcn.0040d820
mov ecx, dword [esp + 0x24]
add esp, 0x14
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
mov eax, 0x1e
pop ebp
mov ecx, dword [esp + 0x9a0]
xor ecx, esp
call fcn.004a81b0
add esp, 0x9a4
ret
call ebp
push eax
push ebx
call fcn.00422d30
push eax
mov eax, dword [esp + 0x18]
movzx edx, di
push edx
push str.bind_port_i__failed:__s
push eax
call fcn.0040d820
mov ecx, dword [esp + 0x28]
add esp, 0x18
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
mov eax, 0x1e
pop ebp
mov ecx, dword [esp + 0x9a0]
xor ecx, esp
call fcn.004a81b0
add esp, 0x9a4
ret
cmp di, word [esp + 0x18]
jbe 0x41905d
mov edx, dword [esp + 0xc]
push str.bind___failed__we_ran_out_of_ports_
push edx
call fcn.0040d820
mov eax, dword [esp + 0x18]
add esp, 8
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
mov eax, 0x1e
pop ebp
mov ecx, dword [esp + 0x9a0]
xor ecx, esp
call fcn.004a81b0
add esp, 0x9a4
ret
mov edi, dword [esp + 0x10]
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x2c]
push edx
push edi
mov dword [esp + 0x20], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x4190be
call ebp
push eax
push ebx
call fcn.00422d30
push eax
mov eax, dword [esp + 0x18]
push str.getsockname___failed:__s
push eax
call fcn.0040d820
add esp, 0x14
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
mov eax, 0x1e
pop ebp
mov ecx, dword [esp + 0x9a0]
xor ecx, esp
call fcn.004a81b0
add esp, 0x9a4
ret
push 1
push edi
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x41910b
call ebp
push eax
push ebx
call fcn.00422d30
mov ecx, dword [esp + 0x14]
push eax
push str.socket_failure:__s
push ecx
call fcn.0040d820
add esp, 0x14
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
mov eax, 0x1e
pop ebp
mov ecx, dword [esp + 0x9a0]
xor ecx, esp
call fcn.004a81b0
add esp, 0x9a4
ret
push 0x100
lea edx, [esp + 0xac]
push edx
push esi
call fcn.004045d0
mov ebp, dword [esp + 0x9c0]
add esp, 0xc
cmp ebp, 2
je 0x419281
mov edi, dword [sym.imp.WS2_32.dll_ntohs]
mov cx, word [esp + 0x28]
lea esp, [esp]
cmp byte [ebx + 0x159], 0
jne 0x41914d
test ebp, ebp
je 0x41917c
cmp ebp, 1
jne 0x419158
cmp cx, 2
jne 0x41917c
movzx eax, cx
sub eax, 2
jne 0x41917c
mov eax, dword [esp + 0x2a]
push eax
call edi
movzx esi, ax
test ebp, ebp
je 0x4191d5
cmp ebp, 1
je 0x41920d
mov cx, word [esp + 0x28]
inc ebp
cmp ebp, 2
jne 0x419140
mov esi, dword [esp + 0x24]
mov edi, dword [esp + 0x10]
mov dword [ebx + 0x348], ebp
mov eax, dword [ebx + 0xd8]
cmp eax, 0xffffffff
je 0x4191a2
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, 0x1c
mov ecx, ebx
mov dword [ebx + 0xd8], edi
mov byte [ebx + 0x151], 1
call fcn.00417e10
mov ecx, dword [esp + 0x9ac]
pop edi
mov eax, esi
pop esi
pop ebp
xor ecx, esp
call fcn.004a81b0
add esp, 0x9a4
ret
xor eax, eax
cmp word [esp + 0x28], 2
movzx ecx, si
setne al
push ecx
lea edx, [esp + 0xac]
push edx
inc eax
push eax
push str.EPRT
push str._s__d_s_d
push ebx
call fcn.00418400
mov esi, eax
add esp, 0x18
test esi, esi
je 0x419186
jmp 0x4191bb
lea ecx, [esp + 0x5ac]
lea edx, [esp + 0xa8]
jmp 0x419220
mov al, byte [edx]
test al, al
je 0x419237
cmp al, 0x2e
jne 0x41922f
mov byte [ecx], 0x2c
jmp 0x419231
mov byte [ecx], al
inc ecx
add edx, 1
jne 0x419220
movzx eax, si
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.004129a0
lea eax, [esp + 0x5c0]
push eax
push str.PORT
push str._s__s
push ebx
call fcn.00418400
mov esi, eax
add esp, 0x24
test esi, esi
je 0x419186
jmp 0x4191bb
mov esi, dword [esp + 0x24]
jmp 0x41918a