Function at 0x10001f70
Capabilities:
Get system information on windows
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14c
mov eax, dword [0x10015004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x20]
push ebx
push esi
mov ebx, edx
mov dword [ebp - 0x14c], eax
mov edx, ecx
mov dword [ebp - 0x148], ebx
push edi
mov dword [ebp - 0x140], edx
xor esi, esi
mov ecx, 1
mov edi, 0x10016278
xor eax, eax
lock cmpxchg dword [edi], ecx
test eax, eax
jne 0x10002013
push 0x114
push eax
lea eax, [ebp - 0x13c]
push eax
call fcn.10004cf0
add esp, 0xc
push str.RtlGetVersion
push str.ntdll.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x1000200d
lea ecx, [ebp - 0x13c]
push ecx
call eax
test eax, eax
jne 0x1000200d
mov eax, dword [ebp - 0x138]
mov dword [0x10016260], eax
mov eax, dword [ebp - 0x134]
mov dword [0x1001626c], eax
call fcn.10001ce0
mov edx, dword [ebp - 0x140]
cmp ebx, 0x40
jae 0x10002033
push 0xd
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10002b42
mov esp, ebp
pop ebp
ret
mov eax, 0x5a4d
cmp word [edx], ax
je 0x1000205b
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10002b42
mov esp, ebp
pop ebp
ret
mov ecx, dword [edx + 0x3c]
mov dword [ebp - 0x144], ecx
lea eax, [ecx + 0xf8]
cmp ebx, eax
jb 0x10002018
cmp dword [ecx + edx], 0x4550
lea ebx, [ecx + edx]
jne 0x1000203d
mov eax, 0x14c
cmp word [ebx + 4], ax
jne 0x1000203d
test byte [ebx + 0x38], 1
jne 0x1000203d
movzx edi, word [ebx + 6]
movzx eax, word [ebx + 0x14]
test edi, edi
je 0x100020bd
lea ecx, [ebx + 0x24]
add ecx, eax
nop dword [eax]
mov edx, dword [ecx + 4]
mov eax, dword [ecx]
test edx, edx
jne 0x100020ae
add eax, dword [ebx + 0x38]
jmp 0x100020b0
add eax, edx
cmp eax, esi
cmova esi, eax
add ecx, 0x28
sub edi, 1
jne 0x100020a0
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
mov ecx, dword [ebp - 0x24]
lea edx, [ecx - 1]
lea edi, [ecx - 1]
not edx
add edi, dword [ebx + 0x50]
lea eax, [ecx - 1]
add eax, esi
and edi, edx
and eax, edx
cmp edi, eax
jne 0x1000203d
mov esi, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push 4
push 0x3000
push edi
push dword [ebx + 0x34]
call esi
mov ebx, eax
test ebx, ebx
jne 0x10002110
push 4
push 0x3000
push edi
push eax
call esi
mov ebx, eax
test ebx, ebx
je 0x10002134
push 0x40
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
jne 0x1000214f
push 0x8000
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10002b42
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 0x144]
add esi, dword [ebp - 0x140]
mov ecx, dword [ebp - 0x148]
mov dword [edi + 4], ebx
movzx eax, word [esi + 0x16]
shr eax, 0xd
and eax, 1
mov dword [edi + 0x1c], 0x10001ef0
mov dword [edi + 0x14], eax
mov dword [edi + 0x20], 0x10001f10
mov dword [edi + 0x24], 0x10001f30
mov dword [edi + 0x28], 0x10001f40
mov dword [edi + 0x2c], 0x10001f60
mov dword [edi + 0x34], 0
mov eax, dword [ebp - 0x24]
mov dword [edi + 0x3c], eax
mov edx, dword [esi + 0x54]
call fcn.100016d0
test eax, eax
je 0x10002280
push 4
push 0x1000
push dword [esi + 0x54]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ecx, dword [ebp - 0x140]
mov esi, eax
mov eax, dword [ebp - 0x144]
push dword [eax + ecx + 0x54]
push ecx
push esi
call fcn.1000db00
mov ecx, dword [ebp - 0x140]
mov edx, dword [ebp - 0x148]
push edi
mov eax, dword [ecx + 0x3c]
add eax, esi
mov esi, dword [ebp - 0x144]
add esi, ecx
mov dword [edi], eax
push esi
mov dword [eax + 0x34], ebx
call fcn.100016f0
add esp, 0x14
test eax, eax
je 0x10002280
mov eax, dword [edi]
mov edx, dword [eax + 0x34]
sub edx, dword [esi + 0x34]
je 0x10002226
cmp dword [eax + 0xa0], 0
je 0x10002280
mov ecx, edi
call fcn.10001a50
mov dword [edi + 0x18], eax
jmp 0x1000222d
mov dword [edi + 0x18], 1
mov ecx, edi
call fcn.10001b00
test eax, eax
je 0x10002280
mov ecx, edi
call fcn.100018d0
test eax, eax
je 0x10002280
mov ecx, edi
call fcn.10001a10
test eax, eax
je 0x10002280
mov ecx, edi
call fcn.10001c70
mov eax, dword [edi]
mov eax, dword [eax + 0x28]
test eax, eax
je 0x100022ca
add eax, ebx
cmp dword [edi + 0x14], 0
je 0x100022b4
push dword [ebp - 0x14c]
push 1
push ebx
call eax
test eax, eax
jne 0x1000229a
push 0x45a
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, edi
call fcn.100022f0
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10002b42
mov esp, ebp
pop ebp
ret
mov dword [edi + 0x10], 1
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10002b42
mov esp, ebp
pop ebp
ret
mov dword [edi + 0x38], eax
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10002b42
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov eax, edi
mov dword [edi + 0x38], 0
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.10002b42
mov esp, ebp
pop ebp
ret