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

Disassembly:
sub esp, 0x9a0
mov eax, dword [esp + 0x9a4]
mov cl, byte [0x4350f8]
push ebx
push ebp
mov edx, dword [eax]
push esi
push edi
mov byte [esp + 0xac], cl
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0xad]
xor ebp, ebp
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov esi, dword [edx + 0x2b4]
mov dword [esp + 0x24], ebp
mov edi, dword [edx + 0x2b4]
xor ebx, ebx
cmp edi, ebp
mov dword [esp + 0x28], ebp
mov dword [esp + 0x10], edx
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x20], ebp
je 0x41b629
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 1
jbe 0x41b629
mov edi, esi
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 0x16
jae 0x41b508
mov ecx, 0x16
jmp 0x41b514
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
inc ecx
push 1
push ecx
call dword [0x4303cc]
mov ebx, eax
add esp, 8
cmp ebx, ebp
jne 0x41b537
pop edi
pop esi
pop ebp
mov eax, 0x1b
pop ebx
add esp, 0x9a0
ret
mov al, byte [esi]
mov ebp, dword [sym.imp.MSVCRT.dll_strchr]
cmp al, 0x3a
jne 0x41b591
mov edi, esi
test edi, edi
je 0x41b5eb
push 0x3a
push edi
call ebp
mov esi, eax
add esp, 8
test esi, esi
je 0x41b5eb
mov edi, dword [sym.imp.MSVCRT.dll_strtol]
push 0xa
lea ecx, [esi + 1]
push 0
push ecx
call edi
push 0x2d
push esi
mov dword [esp + 0x30], eax
call ebp
add esp, 0x14
test eax, eax
je 0x41b5d2
xor esi, esi
push 0xa
inc eax
push esi
push eax
call edi
add esp, 0xc
mov dword [esp + 0x20], eax
jmp 0x41b5dc
push 0x3a
push esi
call ebp
mov edi, eax
add esp, 8
test edi, edi
je 0x41b5b1
mov edx, edi
sub edx, esi
push edx
push esi
push ebx
call dword [sym.imp.MSVCRT.dll_strncpy]
add esp, 0xc
jmp 0x41b545
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x41b5eb
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x20], edx
jmp 0x41b5eb
cmp word [esp + 0x1c], ax
jbe 0x41b5eb
mov dword [esp + 0x20], esi
mov dword [esp + 0x1c], esi
cmp byte [ebx], 0
je 0x41b629
mov ecx, dword [esp + 0x9b4]
lea eax, [esp + 0x1ac]
push 0x401
push eax
mov edx, dword [ecx + 0x38]
push ebx
mov eax, dword [edx + 4]
push eax
call fcn.00426d40
add esp, 0x10
test eax, eax
mov eax, ebx
je 0x41b621
lea eax, [esp + 0x1ac]
test eax, eax
jne 0x41b6c1
mov esi, dword [esp + 0x9b4]
lea ecx, [esp + 0x18]
lea edx, [esp + 0x2c]
push ecx
mov eax, dword [esi + 0xd4]
push edx
push eax
mov dword [esp + 0x24], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x41b695
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.00426750
mov ecx, dword [esp + 0x18]
push eax
push str.getsockname___failed:__s
push ecx
call fcn.00413050
add esp, 0x14
test ebx, ebx
je 0x41b927
push ebx
call dword [0x4303c0]
add esp, 4
mov eax, 0x1e
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x9a0
ret
mov ecx, dword [esp + 0x2c]
lea edx, [esp + 0x1ac]
push 0x401
lea eax, [esp + 0x34]
push edx
and ecx, 0xffff
push eax
push ecx
call fcn.004155f0
add esp, 0x10
lea eax, [esp + 0x1ac]
mov esi, dword [esp + 0x9b4]
lea edx, [esp + 0x24]
push edx
push 0
push eax
push esi
call fcn.0040a150
add esp, 0x10
cmp eax, 1
jne 0x41b6ec
lea eax, [esp + 0x24]
push eax
push esi
call fcn.00415a40
add esp, 8
mov eax, dword [esp + 0x24]
test eax, eax
je 0x41b706
mov ecx, dword [esp + 0x10]
mov esi, dword [eax]
push eax
push ecx
call fcn.0040a3a0
add esp, 8
jmp 0x41b708
xor esi, esi
test ebx, ebx
je 0x41b716
push ebx
call dword [0x4303c0]
add esp, 4
test esi, esi
jne 0x41b73c
mov edx, dword [esp + 0x10]
push str.Curl_resolv_failed__we_can_not_recover_
push edx
call fcn.00413050
add esp, 8
mov eax, 0x1e
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x9a0
ret
mov ebp, dword [sym.imp.WS2_32.dll_socket]
mov ebx, esi
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
xor edi, edi
mov eax, dword [ebx + 8]
test eax, eax
jne 0x41b763
mov eax, dword [esp + 0x9b4]
mov ecx, dword [eax + 0x80]
mov dword [ebx + 8], ecx
mov edx, dword [ebx + 0xc]
mov eax, dword [ebx + 8]
mov ecx, dword [ebx + 4]
push edx
push eax
push ecx
call ebp
cmp eax, 0xffffffff
mov dword [esp + 0x14], eax
jne 0x41b787
call esi
mov ebx, dword [ebx + 0x1c]
mov edi, eax
test ebx, ebx
jne 0x41b74c
jmp 0x41b78b
test ebx, ebx
jne 0x41b7bc
mov edx, dword [esp + 0x9b4]
push edi
push edx
call fcn.00426750
push eax
mov eax, dword [esp + 0x1c]
push str.socket_failure:__s
push eax
call fcn.00413050
add esp, 0x14
mov eax, 0x1e
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x9a0
ret
mov ecx, dword [ebx + 0x10]
mov esi, dword [ebx + 0x18]
mov edx, ecx
lea edi, [esp + 0x2c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x1c]
mov eax, dword [ebx + 0x10]
cmp si, word [esp + 0x20]
mov dword [esp + 0x18], eax
ja 0x41b90a
mov ebp, dword [esp + 0x10]
mov edi, dword [esp + 0x9b4]
cmp word [esp + 0x2c], 2
jne 0x41b809
push esi
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x2e], ax
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x2c]
push ecx
push edx
push eax
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x41b903
call dword [sym.imp.MSVCRT.dll__errno]
cmp dword [eax], 0x2741
jne 0x41b880
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.00426750
and esi, 0xffff
push eax
push esi
push str.bind_port_i__failed:__s
push ebp
call fcn.00413050
mov eax, dword [edi + 0xd4]
add esp, 0x18
lea ecx, [esp + 0x18]
lea edx, [esp + 0x2c]
push ecx
push edx
push eax
mov dword [esp + 0x24], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x41b8a7
mov esi, dword [esp + 0x1c]
jmp 0x41b89a
call dword [sym.imp.MSVCRT.dll__errno]
cmp dword [eax], 0x2740
je 0x41b899
call dword [sym.imp.MSVCRT.dll__errno]
cmp dword [eax], 0xd
jne 0x41b8c5
inc esi
cmp si, word [esp + 0x20]
jbe 0x41b7f5
jmp 0x41b90a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.00426750
push eax
push str.getsockname___failed:__s
push ebp
call fcn.00413050
add esp, 0x14
jmp 0x41b91c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.00426750
and esi, 0xffff
push eax
push esi
push str.bind_port_i__failed:__s
push ebp
call fcn.00413050
mov edx, dword [esp + 0x2c]
add esp, 0x18
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
pop ebp
mov eax, 0x1e
pop ebx
add esp, 0x9a0
ret
cmp si, word [esp + 0x20]
jbe 0x41b937
mov eax, dword [esp + 0x10]
push str.bind___failed__we_ran_out_of_ports_
push eax
call fcn.00413050
add esp, 8
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
pop ebp
mov eax, 0x1e
pop ebx
add esp, 0x9a0
ret
mov ebp, dword [esp + 0x14]
lea edx, [esp + 0x18]
lea eax, [esp + 0x2c]
push edx
push eax
push ebp
mov dword [esp + 0x24], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x41b996
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [esp + 0x9b4]
push eax
push ecx
call fcn.00426750
mov edx, dword [esp + 0x18]
push eax
push str.getsockname___failed:__s
push edx
call fcn.00413050
add esp, 0x14
push ebp
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
pop ebp
mov eax, 0x1e
pop ebx
add esp, 0x9a0
ret
push 1
push ebp
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x41b9e1
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
mov eax, dword [esp + 0x9b8]
push eax
call fcn.00426750
mov ecx, dword [esp + 0x18]
push eax
push str.socket_failure:__s
push ecx
call fcn.00413050
add esp, 0x14
push ebp
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
pop ebp
mov eax, 0x1e
pop ebx
add esp, 0x9a0
ret
lea edx, [esp + 0xac]
push 0x100
push edx
push ebx
call fcn.00409f80
mov edi, dword [esp + 0x9c4]
mov esi, 2
add esp, 0xc
cmp edi, esi
je 0x41bb5c
mov ebp, dword [sym.imp.WS2_32.dll_ntohs]
mov ebx, dword [esp + 0x9b4]
mov al, byte [ebx + 0x139]
test al, al
jne 0x41ba26
test edi, edi
je 0x41ba53
cmp edi, 1
jne 0x41ba32
cmp word [esp + 0x2c], si
jne 0x41ba53
mov eax, dword [esp + 0x2c]
and eax, 0xffff
sub eax, esi
jne 0x41ba53
mov eax, dword [esp + 0x2e]
push eax
call ebp
test edi, edi
je 0x41ba9d
cmp edi, 1
je 0x41badb
inc edi
cmp edi, esi
jne 0x41ba18
mov esi, dword [esp + 0x28]
mov ebp, dword [esp + 0x14]
mov dword [ebx + 0x320], edi
mov eax, dword [ebx + 0xd8]
cmp eax, 0xffffffff
je 0x41ba78
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
push 0x1a
push ebx
mov dword [ebx + 0xd8], ebp
mov byte [ebx + 0x131], 1
call fcn.0041b210
add esp, 8
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x9a0
ret
and eax, 0xffff
xor edx, edx
cmp word [esp + 0x2c], si
lea ecx, [esp + 0xac]
push eax
push ecx
setne dl
inc edx
push edx
push str.EPRT
push str._s__d_s_d
push ebx
call fcn.0041de60
mov esi, eax
add esp, 0x18
test esi, esi
je 0x41ba5c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x9a0
ret
lea edx, [esp + 0xac]
lea ecx, [esp + 0x5b0]
test edx, edx
je 0x41bb0a
lea esi, [esp + 0xac]
mov dl, byte [esi]
test dl, dl
je 0x41bb0a
cmp dl, 0x2e
jne 0x41bb04
mov byte [ecx], 0x2c
jmp 0x41bb06
mov byte [ecx], dl
inc ecx
inc esi
jne 0x41baf4
and eax, 0xffff
mov byte [ecx], 0
mov edx, eax
and edx, 0xff
shr eax, 8
push edx
push eax
push str.__d__d
push 0x14
push ecx
call fcn.00415400
lea eax, [esp + 0x5c4]
push eax
push str.PORT
push str._s__s
push ebx
call fcn.0041de60
mov esi, eax
add esp, 0x24
test esi, esi
je 0x41ba5c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x9a0
ret
mov ebx, dword [esp + 0x9b4]
mov esi, dword [esp + 0x28]
jmp 0x41ba60