Function at 0x507870
Capabilities:
Check os version

Disassembly:
push 0xffffffffffffffff
push 0x595076
mov eax, dword fs:[0]
push eax
sub esp, 0x89c
mov eax, dword [0x5e173c]
xor eax, esp
mov dword [esp + 0x898], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5e173c]
xor eax, esp
push eax
lea eax, [esp + 0x8b0]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [esp + 0xb4], ebx
push 0xc
xor eax, eax
mov dword [esp + 0x2c], 0
mov dword [esp + 0x30], 0
lea ecx, [esp + 0x1c]
push str.Iphlpapi.dll
mov dword [esp + 0x34], 7
mov dword [esp + 0x30], 0
mov word [esp + 0x20], ax
call fcn.00404a80
mov dword [esp + 0x8b8], 0
mov eax, dword [0x7e23f4]
test al, 1
jne 0x507933
or eax, 1
mov dword [0x7e23f4], eax
mov byte [esp + 0x8b8], 1
mov dword [0x7e23f0], 0
call fcn.004c1de0
push 0x59ffb0
call fcn.00565027
add esp, 4
mov byte [esp + 0x8b8], 0
lea eax, [esp + 0x18]
mov ecx, 0x7e23f0
push eax
call fcn.004c1fa0
mov ebp, eax
mov dword [esp + 0x30], ebp
mov dword [esp + 0x8b8], 0xffffffff
cmp dword [esp + 0x2c], 8
jb 0x507966
push dword [esp + 0x18]
call fcn.00564de3
add esp, 4
xor eax, eax
mov dword [esp + 0x2c], 7
mov dword [esp + 0x28], 0
mov word [esp + 0x18], ax
test ebp, ebp
je 0x5079d7
push str.GetAdaptersInfo
push ebp
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
test edi, edi
je 0x5079d7
lea eax, [esp + 0xb0]
mov dword [esp + 0xb0], 0
push eax
push 0
call edi
push dword [esp + 0xb0]
call fcn.00560e4f
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x5079d7
lea eax, [esp + 0xb0]
push eax
push ebp
call edi
test eax, eax
je 0x507a01
push ebp
call fcn.00564de3
add esp, 4
xor al, al
mov ecx, dword [esp + 0x8b0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x898]
xor ecx, esp
call fcn.00564de8
add esp, 0x8a8
ret
mov eax, dword [esp + 0xb0]
mov esi, ebp
mov dword [esp + 0xb8], eax
lea eax, [esp + 0xb8]
push eax
push ebp
call edi
test eax, eax
jne 0x507db4
jmp 0x507a30
push dword [esi + 0x19c]
lea ecx, [esp + 0xc0]
call fcn.0050ff80
mov dword [esp + 0x8b8], 2
lea edx, [esi + 8]
lea ecx, [esp + 0x34]
call fcn.004b12c0
mov edi, eax
mov byte [esp + 0x8b8], 3
lea eax, [esp + 0xbc]
cmp eax, edi
je 0x507ab4
cmp dword [esp + 0xd0], 8
jb 0x507a87
push dword [esp + 0xbc]
call fcn.00564de3
add esp, 4
xor eax, eax
mov dword [esp + 0xd0], 7
push edi
lea ecx, [esp + 0xc0]
mov dword [esp + 0xd0], 0
mov word [esp + 0xc0], ax
call fcn.00404150
mov byte [esp + 0x8b8], 2
cmp dword [esp + 0x48], 8
jb 0x507acf
push dword [esp + 0x34]
call fcn.00564de3
add esp, 4
xor eax, eax
mov dword [esp + 0x48], 7
lea edx, [esi + 0x10c]
mov dword [esp + 0x44], 0
lea ecx, [esp + 0x4c]
mov word [esp + 0x34], ax
call fcn.004b12c0
mov edi, eax
mov byte [esp + 0x8b8], 4
lea eax, [esp + 0xd4]
cmp eax, edi
je 0x507b50
cmp dword [esp + 0xe8], 8
jb 0x507b23
push dword [esp + 0xd4]
call fcn.00564de3
add esp, 4
xor eax, eax
mov dword [esp + 0xe8], 7
push edi
lea ecx, [esp + 0xd8]
mov dword [esp + 0xe8], 0
mov word [esp + 0xd8], ax
call fcn.00404150
mov byte [esp + 0x8b8], 2
cmp dword [esp + 0x60], 8
jb 0x507b6b
push dword [esp + 0x4c]
call fcn.00564de3
add esp, 4
xor eax, eax
mov dword [esp + 0x60], 7
mov word [esp + 0x4c], ax
lea ecx, [esp + 0xbc]
lea eax, [esi + 0x194]
mov dword [esp + 0x5c], 0
push eax
call fcn.005102b0
lea edx, [esi + 0x1b0]
lea ecx, [esp + 0x64]
call fcn.004b12c0
mov edi, eax
mov byte [esp + 0x8b8], 5
lea eax, [esp + 0xec]
cmp eax, edi
je 0x507bff
cmp dword [esp + 0x100], 8
jb 0x507bd2
push dword [esp + 0xec]
call fcn.00564de3
add esp, 4
xor eax, eax
mov dword [esp + 0x100], 7
push edi
lea ecx, [esp + 0xf0]
mov dword [esp + 0x100], 0
mov word [esp + 0xf0], ax
call fcn.00404150
mov byte [esp + 0x8b8], 2
cmp dword [esp + 0x78], 8
jb 0x507c1a
push dword [esp + 0x64]
call fcn.00564de3
add esp, 4
xor eax, eax
mov dword [esp + 0x78], 7
lea edx, [esi + 0x1d8]
mov dword [esp + 0x74], 0
lea ecx, [esp + 0x94]
mov word [esp + 0x64], ax
call fcn.004b12c0
mov edi, eax
mov byte [esp + 0x8b8], 6
lea eax, [esp + 0x11c]
cmp eax, edi
je 0x507c9e
cmp dword [esp + 0x130], 8
jb 0x507c71
push dword [esp + 0x11c]
call fcn.00564de3
add esp, 4
xor eax, eax
mov dword [esp + 0x130], 7
push edi
lea ecx, [esp + 0x120]
mov dword [esp + 0x130], 0
mov word [esp + 0x120], ax
call fcn.00404150
mov byte [esp + 0x8b8], 2
cmp dword [esp + 0xa8], 8
jb 0x507cbf
push dword [esp + 0x94]
call fcn.00564de3
add esp, 4
xor eax, eax
mov dword [esp + 0xa8], 7
lea edx, [esi + 0x1c0]
mov dword [esp + 0xa4], 0
lea ecx, [esp + 0x7c]
mov word [esp + 0x94], ax
call fcn.004b12c0
mov edi, eax
mov byte [esp + 0x8b8], 7
lea eax, [esp + 0x104]
cmp eax, edi
je 0x507d49
cmp dword [esp + 0x118], 8
jb 0x507d1c
push dword [esp + 0x104]
call fcn.00564de3
add esp, 4
xor eax, eax
mov dword [esp + 0x118], 7
push edi
lea ecx, [esp + 0x108]
mov dword [esp + 0x118], 0
mov word [esp + 0x108], ax
call fcn.00404150
mov byte [esp + 0x8b8], 2
cmp dword [esp + 0x90], 8
jb 0x507d67
push dword [esp + 0x7c]
call fcn.00564de3
add esp, 4
xor eax, eax
mov dword [esp + 0x90], 7
mov word [esp + 0x7c], ax
mov ecx, ebx
lea eax, [esp + 0xbc]
mov dword [esp + 0x8c], 0
push eax
call fcn.0050a270
mov esi, dword [esi]
mov dword [esp + 0x8b8], 0xffffffff
lea ecx, [esp + 0xbc]
call fcn.00510160
test esi, esi
jne 0x507a30
push ebp
call fcn.00564de3
add esp, 4
push str.GetIfTable
push dword [esp + 0x34]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x5079d7
mov ebp, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push 0x360
push 0
mov dword [esp + 0xb4], 0
call ebp
mov edi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
call edi
mov ebx, eax
test ebx, ebx
je 0x5079d7
push 0
lea eax, [esp + 0xb0]
mov dword [esp + 0xb0], 0x360
push eax
push ebx
call esi
cmp eax, 0x7a
jne 0x507e3c
push ebx
push 0
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push dword [esp + 0xac]
push 0
call ebp
push eax
call edi
mov ebx, eax
test ebx, ebx
je 0x5079d7
push 0
lea eax, [esp + 0xb0]
push eax
push ebx
call esi
test eax, eax
jne 0x507edc
xor edi, edi
cmp dword [ebx], edi
jbe 0x507edc
mov ebp, dword [esp + 0xb4]
lea esi, [ebx + 0x218]
lea eax, [esi - 0x214]
test eax, eax
je 0x507ecb
cmp dword [esi - 4], 6
jne 0x507ecb
lea ecx, [esp + 0x4b4]
call fcn.0050fe90
mov dword [esp + 0x8b8], 8
lea ecx, [esp + 0x4b4]
push esi
call fcn.005102b0
lea eax, [esp + 0x52c]
push eax
lea ecx, [ebp + 0x24]
call fcn.0040be40
mov dword [esp + 0x8b8], 0xffffffff
lea ecx, [esp + 0x4b4]
call fcn.00510160
inc edi
add esi, 0x35c
cmp edi, dword [ebx]
jb 0x507e70
mov ebp, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push ebx
push 0
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ebx, dword [esp + 0xb4]
mov eax, dword [ebx + 0x24]
cmp eax, dword [ebx + 0x28]
je 0x507f44
push dword [ebx + 0x28]
push eax
call fcn.0050afe0
push dword [ebx + 0x28]
lea ecx, [esp + 0xc0]
mov dword [esp + 0xc0], 0
push dword [ebx + 0x24]
call fcn.0050b020
mov edx, dword [esp + 0xc4]
lea ecx, [ebx + 0x24]
sub edx, dword [ebx + 0x24]
mov eax, 0x2aaaaaab
imul edx
add esp, 0x10
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
push eax
call fcn.0050a570
mov al, 1
jmp 0x5079d9