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

Disassembly:
sub esp, 0x2a0
mov eax, dword [0x100a3428]
xor eax, esp
mov dword [esp + 0x29c], eax
movzx ecx, word [edi + 0x1aa]
mov eax, dword [esp + 0x2a4]
push ebx
movzx ebx, word [edi + 0x1a8]
push ebp
xor ebp, ebp
push esi
mov esi, dword [edi + 0x574]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x14], ebp
mov dword [esp + 0x10], ebp
mov dword [esp + 0x18], ebx
mov dword [esp + 0x24], ecx
cmp esi, ebp
jne 0x1004c215
cmp bx, bp
je 0x1004c671
push 0x80
lea edx, [esp + 0x2c]
push ebp
push edx
call sub.MSVCR100.dll_memset
add esp, 0xc
cmp esi, ebp
je 0x1004c5fc
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1004c235
sub eax, edx
cmp eax, 0xff
jae 0x1004c5fc
push 0xff
lea eax, [esp + 0xad]
push ebp
push eax
mov byte [esp + 0xb4], cl
call sub.MSVCR100.dll_memset
mov edx, dword [0x100a3144]
mov eax, edx
mov dword [esp + 0x2c], ebp
add esp, 0xc
lea ebp, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1004c275
sub eax, ebp
mov ebp, dword [sym.imp.MSVCR100.dll_strncmp]
push eax
push esi
push edx
call ebp
add esp, 0xc
test eax, eax
jne 0x1004c2aa
mov eax, dword [0x100a3144]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1004c298
sub eax, edx
add esi, eax
mov ebx, 1
jmp 0x1004c2ed
mov edx, dword [str.host_]
mov eax, edx
lea ebx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1004c2b5
sub eax, ebx
push eax
push esi
push edx
call ebp
add esp, 0xc
test eax, eax
jne 0x1004c2e9
mov eax, dword [str.host_]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1004c2d2
mov ebp, dword [esp + 0x2b8]
sub eax, edx
add esi, eax
jmp 0x1004c383
mov ebx, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
mov eax, dword [edx + 0x4ec]
mov ebp, dword [esp + 0x2b8]
push 0x100
lea ecx, [esp + 0xac]
push ecx
mov ecx, dword [esp + 0x2c4]
push esi
push eax
push ecx
push ebp
call fcn.10017d70
add esp, 0x18
sub eax, 0
je 0x1004c363
dec eax
je 0x1004c346
dec eax
jne 0x1004c37b
push ebp
lea edx, [esp + 0xac]
push edx
push esi
push str.Local_Interface__s_is_ip__s_using_address_family__i
push edi
call fcn.1001ccc0
add esp, 0x14
jmp 0x1004c438
pop esi
pop ebp
mov eax, 1
pop ebx
mov ecx, dword [esp + 0x29c]
xor ecx, esp
call fcn.1005cc54
add esp, 0x2a0
ret
test ebx, ebx
je 0x1004c383
push esi
push str.Couldnt_bind_to_interface__s
push edi
call fcn.1001cb80
add esp, 0xc
jmp 0x1004c6bc
test ebx, ebx
jne 0x1004c5de
mov ebx, dword [esp + 0x1c]
mov al, byte [ebx + 0x4f8]
mov byte [esp + 0xf], al
cmp ebp, 2
jne 0x1004c39f
mov byte [ebx + 0x4f8], 1
jmp 0x1004c3ab
cmp ebp, 0x17
jne 0x1004c3ab
mov byte [ebx + 0x4f8], 2
lea ecx, [esp + 0x10]
push ecx
push 0
push 0x50
push esi
push edi
call fcn.100405a0
add esp, 0x14
cmp eax, 1
jne 0x1004c3d1
lea edx, [esp + 0x10]
push edx
push edi
call fcn.1001c470
add esp, 8
mov al, byte [esp + 0xf]
mov byte [ebx + 0x4f8], al
mov eax, dword [esp + 0x10]
test eax, eax
je 0x1004c5de
mov edx, dword [eax]
push 0x100
lea ecx, [esp + 0xac]
push ecx
push edx
call fcn.1003f6b0
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax]
mov edx, dword [ecx + 4]
push edx
lea eax, [esp + 0xb8]
push eax
push ebp
push esi
push str.Name__s_family__i_resolved_to__s_family__i
push edi
call fcn.1001ccc0
mov ecx, dword [esp + 0x34]
push ecx
push edi
call fcn.100408d0
mov edx, dword [esp + 0x3c]
mov eax, dword [edx]
add esp, 0x2c
cmp ebp, dword [eax + 4]
jne 0x1004c346
cmp ebp, 0x17
jne 0x1004c593
lea ecx, [esp + 0xa8]
push 0x25
push ecx
call dword [sym.imp.MSVCR100.dll_strchr]
mov esi, eax
add esp, 8
test esi, esi
je 0x1004c45e
mov byte [esi], 0
inc esi
lea edx, [esp + 0x30]
push edx
lea eax, [esp + 0xac]
push eax
push 0x17
call fcn.100525a0
add esp, 0xc
test eax, eax
jle 0x1004c4b2
mov edx, dword [esp + 0x18]
mov ecx, 0x17
push edx
mov word [esp + 0x2c], cx
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x2a], ax
test esi, esi
je 0x1004c4b2
push 0xa
push 0
push esi
call dword [sym.imp.MSVCR100.dll_strtoul]
add esp, 0xc
cmp eax, 0xffffffff
ja 0x1004c346
mov dword [esp + 0x40], eax
mov dword [esp + 0x14], 0x1c
mov ebx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x2b4]
push eax
lea ecx, [esp + 0x2c]
push ecx
push esi
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jns 0x1004c52b
mov ebp, dword [sym.imp.WS2_32.dll_ntohs]
mov eax, dword [esp + 0x24]
dec eax
mov dword [esp + 0x24], eax
test eax, eax
jle 0x1004c68b
inc ebx
test bx, bx
je 0x1004c68b
movzx edx, bx
dec edx
push edx
push str.Bind_to_local_port__hu_failed__trying_next
push edi
call fcn.1001ccc0
add esp, 0xc
push ebx
call ebp
mov word [esp + 0x2a], ax
mov eax, dword [esp + 0x14]
push eax
lea ecx, [esp + 0x2c]
push ecx
push esi
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
js 0x1004c4e0
push 0x80
lea edx, [esp + 0xac]
push 0
push edx
mov dword [esp + 0x2c], 0x80
call sub.MSVCR100.dll_memset
add esp, 0xc
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0xac]
push ecx
push esi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jns 0x1004c651
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push 0x100
lea edx, [esp + 0x1ac]
mov esi, eax
push edx
push esi
mov dword [edi + 0xa38], esi
call fcn.1000ec90
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
jmp 0x1004c6b3
cmp ebp, 2
jne 0x1004c4ba
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0xac]
push ecx
push ebp
call fcn.100525a0
add esp, 0xc
test eax, eax
jle 0x1004c4ba
mov eax, dword [esp + 0x18]
mov edx, ebp
push eax
mov word [esp + 0x2c], dx
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x2a], ax
mov dword [esp + 0x14], 0x10
jmp 0x1004c4ba
push esi
push str.Couldnt_bind_to__s
push edi
mov dword [edi + 0xe84], 0
call fcn.1001cb80
add esp, 0xc
jmp 0x1004c6bc
mov eax, dword [esp + 0x2b8]
cmp eax, 0x17
jne 0x1004c628
mov ecx, eax
push ebx
mov word [esp + 0x2c], cx
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x2a], ax
mov dword [esp + 0x14], 0x1c
jmp 0x1004c4be
cmp eax, 2
jne 0x1004c4be
mov edx, eax
push ebx
mov word [esp + 0x2c], dx
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x2a], ax
mov dword [esp + 0x14], 0x10
jmp 0x1004c4be
movzx eax, bx
push eax
push str.Local_port:__hu
push edi
call fcn.1001ccc0
mov ecx, dword [esp + 0x28]
add esp, 0xc
mov dword [ecx + 0x230], 1
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x29c]
xor ecx, esp
call fcn.1005cc54
add esp, 0x2a0
ret
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push 0x100
lea edx, [esp + 0x1ac]
mov esi, eax
push edx
push esi
mov dword [edi + 0xa38], esi
call fcn.1000ec90
push eax
push esi
push str.bind_failed_with_errno__d:__s
push edi
call fcn.1001cb80
add esp, 0x1c
mov ecx, dword [esp + 0x2a8]
pop esi
pop ebp
pop ebx
xor ecx, esp
mov eax, 0x2d
call fcn.1005cc54
add esp, 0x2a0
ret