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

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 0xc]
sub esp, 0x38
push ebx
push esi
xor esi, esi
push edi
cmp edx, 0x40
jb 0x1003fad0
mov ecx, dword [ebp + 8]
mov eax, 0x5a4d
cmp word [ecx], ax
jne 0x1003fe7a
mov eax, dword [ecx + 0x3c]
add eax, 0xf8
cmp edx, eax
jae 0x1003fae1
push 0xd
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [ecx + 0x3c]
add edi, ecx
mov dword [ebp - 0xc], edi
cmp dword [edi], 0x4550
jne 0x1003fe7a
mov eax, 0x14c
cmp word [edi + 4], ax
jne 0x1003fe7a
mov eax, dword [edi + 0x38]
mov dword [ebp - 0x10], eax
test al, 1
jne 0x1003fe7a
movzx ecx, word [edi + 0x14]
movzx ebx, word [edi + 6]
add ecx, 0x24
test ebx, ebx
je 0x1003fb47
add ecx, edi
mov edi, eax
mov eax, dword [ecx + 4]
mov edx, dword [ecx]
test eax, eax
jne 0x1003fb33
lea eax, [edx + edi]
jmp 0x1003fb35
add eax, edx
cmp eax, esi
cmovbe eax, esi
add ecx, 0x28
mov esi, eax
sub ebx, 1
jne 0x1003fb25
mov edi, dword [ebp - 0xc]
lea eax, [ebp - 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [ebp - 0x34]
lea edx, [ecx - 1]
lea ebx, [ecx - 1]
not edx
add ebx, dword [edi + 0x50]
lea eax, [ecx - 1]
add eax, esi
and ebx, edx
and eax, edx
cmp ebx, eax
jne 0x1003fe7a
mov esi, dword [ebp + 0x24]
push esi
push 4
push 0x3000
push ebx
push dword [edi + 0x34]
call dword [ebp + 0x10]
add esp, 0x14
mov dword [ebp - 4], eax
test eax, eax
jne 0x1003fba3
push esi
push 4
push 0x3000
push ebx
push eax
call dword [ebp + 0x10]
add esp, 0x14
mov dword [ebp - 4], eax
test eax, eax
je 0x1003fbce
push 0x40
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [ebp - 4]
mov ebx, eax
mov dword [ebp - 0x14], ebx
test ebx, ebx
jne 0x1003fbdf
push esi
push 0x8000
push eax
push ecx
call dword [ebp + 0x14]
add esp, 0x10
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebx + 4], ecx
movzx eax, word [edi + 0x16]
shr eax, 0xd
and eax, 1
mov dword [ebx + 0x34], esi
mov dword [ebx + 0x14], eax
mov eax, dword [ebp + 0x10]
mov dword [ebx + 0x1c], eax
mov eax, dword [ebp + 0x14]
mov dword [ebx + 0x20], eax
mov eax, dword [ebp + 0x18]
mov dword [ebx + 0x24], eax
mov eax, dword [ebp + 0x1c]
mov dword [ebx + 0x28], eax
mov eax, dword [ebp + 0x20]
mov dword [ebx + 0x2c], eax
mov eax, dword [ebp - 0x34]
mov dword [ebx + 0x3c], eax
push dword [edi + 0x54]
push dword [ebp + 0xc]
call fcn.1003aec0
add esp, 8
test eax, eax
je 0x1003fd4f
push esi
push 4
push 0x1000
push dword [edi + 0x54]
push dword [ebp - 4]
call dword [ebp + 0x10]
push dword [edi + 0x54]
mov esi, eax
push dword [ebp + 8]
push esi
call fcn.1008b170
mov eax, dword [ebp + 8]
add esp, 0x20
mov ecx, dword [ebp - 4]
mov dword [ebp - 0x10], 0
mov eax, dword [eax + 0x3c]
add eax, esi
xor esi, esi
mov dword [ebx], eax
mov dword [eax + 0x34], ecx
mov eax, dword [ebx]
mov edx, dword [ebx + 4]
mov dword [ebp - 8], edx
movzx ecx, word [eax + 0x14]
add ecx, 0x24
cmp si, word [eax + 6]
jae 0x1003fd26
lea edi, [ecx + eax]
mov ecx, dword [edi + 4]
test ecx, ecx
jne 0x1003fcc7
mov eax, dword [ebp - 0xc]
mov esi, dword [eax + 0x38]
test esi, esi
jle 0x1003fd0b
push dword [ebx + 0x34]
mov eax, dword [edi]
push 4
push 0x1000
add eax, edx
push esi
push eax
mov eax, dword [ebx + 0x1c]
call eax
add esp, 0x14
test eax, eax
je 0x1003fd4f
mov eax, dword [edi]
add eax, dword [ebp - 8]
push esi
push 0
push eax
mov dword [edi - 4], eax
call fcn.1008aed0
jmp 0x1003fd05
mov eax, dword [edi + 8]
add eax, ecx
cmp dword [ebp + 0xc], eax
jb 0x1003fd47
push dword [ebx + 0x34]
mov eax, dword [edi]
push 4
push 0x1000
add eax, edx
push ecx
push eax
mov eax, dword [ebx + 0x1c]
call eax
add esp, 0x14
test eax, eax
je 0x1003fd4f
push dword [edi + 4]
mov eax, dword [edi + 8]
mov esi, dword [edi]
add eax, dword [ebp + 8]
add esi, dword [ebp - 8]
push eax
push esi
call fcn.1008b170
mov dword [edi - 4], esi
mov edx, dword [ebp - 8]
add esp, 0xc
mov eax, dword [ebx]
add edi, 0x28
mov esi, dword [ebp - 0x10]
inc esi
mov dword [ebp - 0x10], esi
movzx eax, word [eax + 6]
cmp esi, eax
jl 0x1003fc83
mov edi, dword [ebp - 0xc]
mov ecx, dword [ebx]
mov eax, dword [ecx + 0x34]
sub eax, dword [edi + 0x34]
mov dword [ebp - 0x10], eax
je 0x1003fdcd
cmp dword [ecx + 0xa4], 0
jne 0x1003fd5e
xor eax, eax
jmp 0x1003fdd2
push 0xd
call dword [sym.imp.KERNEL32.dll_SetLastError]
push ebx
call fcn.1003f8d0
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebx + 4]
mov edi, dword [ecx + 0xa0]
add edi, edx
mov dword [ebp - 0xc], edx
mov eax, dword [edi]
test eax, eax
je 0x1003fdcd
mov ecx, dword [edi + 4]
add eax, edx
mov dword [ebp + 0xc], eax
lea edx, [edi + 8]
xor esi, esi
lea eax, [ecx - 8]
test eax, 0xfffffffe
jbe 0x1003fdbe
mov ebx, dword [ebp + 0xc]
nop dword [eax]
movzx eax, word [edx]
mov ecx, eax
and ecx, 0xf000
cmp ecx, 0x3000
jne 0x1003fdae
mov ecx, dword [ebp - 0x10]
and eax, 0xfff
add dword [eax + ebx], ecx
mov ecx, dword [edi + 4]
inc esi
add edx, 2
lea eax, [ecx - 8]
shr eax, 1
cmp esi, eax
jb 0x1003fd90
mov eax, dword [edi + ecx]
add edi, ecx
mov edx, dword [ebp - 0xc]
test eax, eax
jne 0x1003fd72
mov ebx, dword [ebp - 0x14]
mov eax, 1
push ebx
mov dword [ebx + 0x18], eax
call fcn.1003ad60
add esp, 4
test eax, eax
je 0x1003fd4f
push ebx
call fcn.1003af90
add esp, 4
test eax, eax
je 0x1003fd4f
mov eax, dword [ebx]
mov esi, dword [eax + 0xc0]
test esi, esi
je 0x1003fe25
mov edi, dword [ebx + 4]
mov esi, dword [esi + edi + 0xc]
test esi, esi
je 0x1003fe25
mov eax, dword [esi]
test eax, eax
je 0x1003fe25
push 0
push 1
push edi
call eax
mov eax, dword [esi + 4]
lea esi, [esi + 4]
test eax, eax
jne 0x1003fe14
mov eax, dword [ebx]
mov eax, dword [eax + 0x28]
test eax, eax
je 0x1003fe6a
mov ecx, dword [ebp - 4]
add eax, ecx
cmp dword [ebx + 0x14], 0
je 0x1003fe5e
push 0
push 1
push ecx
call eax
test eax, eax
jne 0x1003fe4e
push 0x45a
jmp 0x1003fd49
pop edi
pop esi
mov dword [ebx + 0x10], 1
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
mov dword [ebx + 0x38], eax
mov eax, ebx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov dword [ebx + 0x38], 0
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret