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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
and dword [ebp - 0x4c], 0
and dword [ebp - 0x14], 0
and dword [ebp - 4], 0
and dword [ebp - 8], 0
and dword [ebp - 0x10], 0
or dword [ebp - 0x18], 0xffffffff
and dword [ebp - 0x24], 0
and dword [ebp - 0x20], 0
cmp dword [ebp + 0xc], 0
jne 0x410fe6
xor eax, eax
jne 0x410fdb
xor eax, eax
jmp 0x411346
mov eax, dword [ebp + 0x18]
and eax, 0x28
je 0x411026
mov eax, dword [ebp + 8]
mov dword [ebp - 8], eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 8]
call fcn.0040f126
add esp, 0xc
test eax, eax
jne 0x41101e
xor eax, eax
jne 0x41100b
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x411346
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x20], eax
jmp 0x41102c
mov eax, dword [ebp + 8]
mov dword [ebp - 0x20], eax
xor eax, eax
jne 0x41102c
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
movzx eax, word [eax]
cmp eax, 0x5a4d
je 0x411053
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x4112f6
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x20]
add ecx, dword [eax + 0x3c]
mov dword [ebp - 0x54], ecx
mov eax, dword [ebp - 0x54]
cmp dword [eax], 0x4550
je 0x41107a
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x4112f6
mov eax, dword [ebp - 0x54]
movzx eax, word [eax + 4]
cmp eax, 0x14c
je 0x411098
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x4112f6
mov eax, dword [ebp - 0x54]
mov eax, dword [eax + 0x38]
and eax, 1
je 0x4110b3
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x4112f6
cmp dword [ebp - 0x14], 0
jne 0x4110e8
push 4
push 0x3000
mov eax, dword [ebp - 0x54]
push dword [eax + 0x50]
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x4110e8
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jne 0x4110df
jmp 0x4112f6
xor eax, eax
jne 0x4110e8
push 0x54
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
jne 0x411123
push 0x8000
push 0
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x4112f6
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x14]
mov dword [eax + 0x2c], ecx
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x54]
mov ecx, dword [ecx + 0x50]
mov dword [eax + 0x30], ecx
mov eax, dword [ebp - 0x54]
movzx eax, word [eax + 0x16]
and eax, 0x2000
neg eax
sbb eax, eax
neg eax
mov ecx, dword [ebp - 0x4c]
mov dword [ecx + 0x1c], eax
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp + 0xc]
mov dword [eax + 0x3c], ecx
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp + 0x18]
mov dword [eax + 0x44], ecx
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp + 0x14]
mov dword [eax + 0x40], ecx
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 8]
mov dword [eax + 0x34], ecx
mov eax, dword [ebp + 0x18]
and eax, 0x10
je 0x411185
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp + 0x10]
mov dword [eax + 0x38], ecx
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x44]
mov dword [eax + 0x24], ecx
push 4
push 0x1000
mov eax, dword [ebp - 0x54]
push dword [eax + 0x54]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x54]
push dword [eax + 0x54]
push dword [ebp - 0xc]
push dword [ebp - 4]
call fcn.00401680
add esp, 0xc
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
add ecx, dword [eax + 0x3c]
mov eax, dword [ebp - 0x4c]
mov dword [eax + 0x28], ecx
mov eax, dword [ebp - 0x4c]
mov eax, dword [eax + 0x28]
mov ecx, dword [ebp - 0x14]
mov dword [eax + 0x34], ecx
push dword [ebp - 0x4c]
push dword [ebp - 0x54]
push dword [ebp - 0x20]
call fcn.0040f602
add esp, 0xc
test eax, eax
jne 0x4111fa
jmp 0x411319
mov eax, dword [ebp - 0x54]
mov ecx, dword [ebp - 0x14]
sub ecx, dword [eax + 0x34]
mov dword [ebp - 0x50], ecx
je 0x41121d
push dword [ebp - 0x50]
push dword [ebp - 0x4c]
call fcn.0040f353
pop ecx
pop ecx
mov ecx, dword [ebp - 0x4c]
mov dword [ecx + 0x20], eax
jmp 0x411227
mov eax, dword [ebp - 0x4c]
mov dword [eax + 0x20], 1
push dword [ebp - 0x4c]
call fcn.0040f2a9
pop ecx
test eax, eax
jne 0x411239
jmp 0x411319
xor eax, eax
jne 0x411239
push dword [ebp - 0x4c]
call fcn.00410a4e
pop ecx
test eax, eax
jne 0x41124f
jmp 0x411319
xor eax, eax
jne 0x41124f
push dword [ebp - 0x4c]
call fcn.0040fd9e
pop ecx
test eax, eax
jne 0x411265
jmp 0x411319
mov eax, dword [ebp + 0x18]
and eax, 2
jne 0x41127f
push dword [ebp - 0x4c]
call fcn.0040f42f
pop ecx
test eax, eax
jne 0x41127f
jmp 0x411319
xor eax, eax
jne 0x41127f
push dword [ebp - 0x4c]
call fcn.00410029
pop ecx
mov eax, dword [ebp + 0x18]
and eax, 1
jne 0x4112e5
mov eax, dword [ebp - 0x4c]
cmp dword [eax + 0x1c], 0
je 0x4112e5
mov eax, dword [ebp - 0x4c]
cmp dword [eax + 0x4c], 0
je 0x4112e5
xor eax, eax
jne 0x4112a6
mov eax, dword [ebp + 0x18]
and eax, 0x10
neg eax
sbb eax, eax
not eax
and eax, dword [ebp + 0x10]
push eax
push 1
push dword [ebp - 0x14]
mov eax, dword [ebp - 0x4c]
call dword [eax + 0x4c]
mov dword [ebp - 0x58], eax
cmp dword [ebp - 0x58], 0
jne 0x4112db
push 0x45a
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x411319
mov eax, dword [ebp - 0x4c]
mov dword [eax + 0x18], 1
xor eax, eax
jne 0x4112e5
push dword [ebp - 0x4c]
call fcn.0040fb03
pop ecx
xor eax, eax
jne 0x4112f2
cmp dword [ebp - 0x24], 0
je 0x411305
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
cmp dword [ebp - 0x18], 0xffffffff
je 0x411314
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x4c]
jmp 0x411346
xor eax, eax
jne 0x411319
push dword [ebp - 0x4c]
call fcn.0040e803
pop ecx
cmp dword [ebp - 0x24], 0
je 0x411335
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
cmp dword [ebp - 0x18], 0xffffffff
je 0x411344
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
leave
ret