Function at 0x1003fbe0
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 0x1003fc10
mov ecx, dword [ebp + 8]
mov eax, 0x5a4d
cmp word [ecx], ax
jne 0x1003ffba
mov eax, dword [ecx + 0x3c]
add eax, 0xf8
cmp edx, eax
jae 0x1003fc21
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 0x1003ffba
mov eax, 0x14c
cmp word [edi + 4], ax
jne 0x1003ffba
mov eax, dword [edi + 0x38]
mov dword [ebp - 0x10], eax
test al, 1
jne 0x1003ffba
movzx ecx, word [edi + 0x14]
movzx ebx, word [edi + 6]
add ecx, 0x24
test ebx, ebx
je 0x1003fc87
add ecx, edi
mov edi, eax
mov eax, dword [ecx + 4]
mov edx, dword [ecx]
test eax, eax
jne 0x1003fc73
lea eax, [edx + edi]
jmp 0x1003fc75
add eax, edx
cmp eax, esi
cmovbe eax, esi
add ecx, 0x28
mov esi, eax
sub ebx, 1
jne 0x1003fc65
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 0x1003ffba
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 0x1003fce3
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 0x1003fd0e
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 0x1003fd1f
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.1003b000
add esp, 8
test eax, eax
je 0x1003fe8f
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.1008b460
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 0x1003fe66
lea edi, [ecx + eax]
mov ecx, dword [edi + 4]
test ecx, ecx
jne 0x1003fe07
mov eax, dword [ebp - 0xc]
mov esi, dword [eax + 0x38]
test esi, esi
jle 0x1003fe4b
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 0x1003fe8f
mov eax, dword [edi]
add eax, dword [ebp - 8]
push esi
push 0
push eax
mov dword [edi - 4], eax
call fcn.1008b1c0
jmp 0x1003fe45
mov eax, dword [edi + 8]
add eax, ecx
cmp dword [ebp + 0xc], eax
jb 0x1003fe87
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 0x1003fe8f
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.1008b460
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 0x1003fdc3
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 0x1003ff0d
cmp dword [ecx + 0xa4], 0
jne 0x1003fe9e
xor eax, eax
jmp 0x1003ff12
push 0xd
call dword [sym.imp.KERNEL32.dll_SetLastError]
push ebx
call fcn.1003fa10
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 0x1003ff0d
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 0x1003fefe
mov ebx, dword [ebp + 0xc]
nop dword [eax]
movzx eax, word [edx]
mov ecx, eax
and ecx, 0xf000
cmp ecx, 0x3000
jne 0x1003feee
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 0x1003fed0
mov eax, dword [edi + ecx]
add edi, ecx
mov edx, dword [ebp - 0xc]
test eax, eax
jne 0x1003feb2
mov ebx, dword [ebp - 0x14]
mov eax, 1
push ebx
mov dword [ebx + 0x18], eax
call fcn.1003aea0
add esp, 4
test eax, eax
je 0x1003fe8f
push ebx
call fcn.1003b0d0
add esp, 4
test eax, eax
je 0x1003fe8f
mov eax, dword [ebx]
mov esi, dword [eax + 0xc0]
test esi, esi
je 0x1003ff65
mov edi, dword [ebx + 4]
mov esi, dword [esi + edi + 0xc]
test esi, esi
je 0x1003ff65
mov eax, dword [esi]
test eax, eax
je 0x1003ff65
push 0
push 1
push edi
call eax
mov eax, dword [esi + 4]
lea esi, [esi + 4]
test eax, eax
jne 0x1003ff54
mov eax, dword [ebx]
mov eax, dword [eax + 0x28]
test eax, eax
je 0x1003ffaa
mov ecx, dword [ebp - 4]
add eax, ecx
cmp dword [ebx + 0x14], 0
je 0x1003ff9e
push 0
push 1
push ecx
call eax
test eax, eax
jne 0x1003ff8e
push 0x45a
jmp 0x1003fe89
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