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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x230
mov eax, dword [0x5df7e4]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
mov eax, ecx
mov dword [ebp - 0x224], edx
mov ecx, dword [ebp + 8]
push esi
push edi
mov edi, dword [eax]
mov dword [ebp - 0x218], eax
mov dword [ebp - 0x21c], ecx
xor ecx, ecx
push 0x100
mov eax, dword [edi + 0x12c]
mov ebx, dword [edi + 0x2ac]
movzx esi, word [edi + 0x128]
mov dword [ebp - 0x22c], eax
lea eax, [ebp - 0x10c]
push ecx
push eax
mov dword [ebp - 0x210], ecx
mov dword [ebp - 0x214], ecx
mov dword [ebp - 0x220], ebx
call fcn.0052a280
add esp, 0xc
test ebx, ebx
jne 0x4a224d
test si, si
je 0x4a24ad
push 0x80
lea eax, [ebp - 0x18c]
push 0
push eax
call fcn.0052a280
add esp, 0xc
test ebx, ebx
je 0x4a238f
push ebx
call fcn.0053f120
pop ecx
cmp eax, 0xff
jae 0x4a238f
mov eax, dword [edi + 0x23c]
push 2
pop ebx
mov dword [ebp - 0x228], eax
cmp dword [ebp - 0x21c], ebx
jne 0x4a229e
mov dword [edi + 0x23c], 1
mov edx, dword [ebp - 0x220]
lea eax, [ebp - 0x214]
mov ecx, dword [ebp - 0x218]
push eax
push 0
call fcn.004a2d8a
pop ecx
pop ecx
cmp eax, 1
jne 0x4a22d0
mov ecx, dword [ebp - 0x218]
lea edx, [ebp - 0x214]
call fcn.004a95d9
mov eax, dword [ebp - 0x228]
mov dword [edi + 0x23c], eax
mov eax, dword [ebp - 0x214]
test eax, eax
je 0x4a2373
mov ecx, dword [eax]
lea edx, [ebp - 0x10c]
push 0x100
call fcn.004a2ba9
mov eax, dword [ebp - 0x214]
pop ecx
mov eax, dword [eax]
push dword [eax + 4]
lea eax, [ebp - 0x10c]
push eax
push dword [ebp - 0x21c]
push dword [ebp - 0x220]
push str.Name__s_family__i_resolved_to__s_family__i_n
push edi
call fcn.0049dbc9
mov edx, dword [ebp - 0x214]
add esp, 0x18
mov ecx, edi
call fcn.004a2ecf
cmp dword [ebp - 0x21c], ebx
jne 0x4a239a
lea edx, [ebp - 0x188]
lea ecx, [ebp - 0x10c]
call fcn.004b5c14
test eax, eax
jle 0x4a239a
push esi
mov word [ebp - 0x18c], bx
call dword [sym.imp.WS2_32.dll_htons]
push 0x10
mov word [ebp - 0x18a], ax
pop eax
mov dword [ebp - 0x210], eax
jmp 0x4a23a0
push dword [ebp - 0x220]
push str.Couldnt_bind_to__s
push edi
call fcn.0049dc37
add esp, 0xc
push 0x2d
pop eax
jmp 0x4a24af
push 2
pop ebx
cmp dword [ebp - 0x21c], ebx
je 0x4a2353
mov eax, dword [ebp - 0x210]
push eax
jmp 0x4a23e8
mov eax, dword [ebp - 0x22c]
dec eax
mov dword [ebp - 0x22c], eax
test eax, eax
jle 0x4a246a
movzx eax, si
push eax
push str.Bind_to_local_port__d_failed__trying_next_n
push edi
call fcn.0049dbc9
add esp, 0xc
inc esi
cmp word [ebp - 0x18c], bx
jne 0x4a23e2
push esi
call dword [sym.imp.WS2_32.dll_ntohs]
mov word [ebp - 0x18a], ax
push dword [ebp - 0x210]
lea eax, [ebp - 0x18c]
push eax
push dword [ebp - 0x224]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
js 0x4a23a3
mov eax, 0x80
push eax
mov dword [ebp - 0x228], eax
lea eax, [ebp - 0x20c]
push 0
push eax
call fcn.0052a280
add esp, 0xc
lea eax, [ebp - 0x228]
push eax
lea eax, [ebp - 0x20c]
push eax
push dword [ebp - 0x224]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jns 0x4a248e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [ebp - 0x218]
mov esi, eax
mov edx, esi
mov dword [edi + 0x84a4], esi
call fcn.004a6e35
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push edi
call fcn.0049dc37
add esp, 0x10
jmp 0x4a2387
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [ebp - 0x218]
mov esi, eax
mov edx, esi
mov dword [edi + 0x84a4], esi
call fcn.004a6e35
push eax
push esi
push str.bind_failed_with_errno__d:__s
jmp 0x4a245c
movzx eax, si
push eax
push str.Local_port:__d_n
push edi
call fcn.0049dbc9
mov eax, dword [ebp - 0x218]
add esp, 0xc
mov byte [eax + 0x13e], 1
xor eax, eax
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005121be
leave
ret