Function at 0x1003fc70
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 0x1003fca0
mov ecx, dword [ebp + 8]
mov eax, 0x5a4d
cmp word [ecx], ax
jne 0x1004004a
mov eax, dword [ecx + 0x3c]
add eax, 0xf8
cmp edx, eax
jae 0x1003fcb1
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 0x1004004a
mov eax, 0x14c
cmp word [edi + 4], ax
jne 0x1004004a
mov eax, dword [edi + 0x38]
mov dword [ebp - 0x10], eax
test al, 1
jne 0x1004004a
movzx ecx, word [edi + 0x14]
movzx ebx, word [edi + 6]
add ecx, 0x24
test ebx, ebx
je 0x1003fd17
add ecx, edi
mov edi, eax
mov eax, dword [ecx + 4]
mov edx, dword [ecx]
test eax, eax
jne 0x1003fd03
lea eax, [edx + edi]
jmp 0x1003fd05
add eax, edx
cmp eax, esi
cmovbe eax, esi
add ecx, 0x28
mov esi, eax
sub ebx, 1
jne 0x1003fcf5
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 0x1004004a
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 0x1003fd73
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 0x1003fd9e
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 0x1003fdaf
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.1003b080
add esp, 8
test eax, eax
je 0x1003ff1f
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.1008b7e0
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 0x1003fef6
lea edi, [ecx + eax]
mov ecx, dword [edi + 4]
test ecx, ecx
jne 0x1003fe97
mov eax, dword [ebp - 0xc]
mov esi, dword [eax + 0x38]
test esi, esi
jle 0x1003fedb
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 0x1003ff1f
mov eax, dword [edi]
add eax, dword [ebp - 8]
push esi
push 0
push eax
mov dword [edi - 4], eax
call fcn.1008b540
jmp 0x1003fed5
mov eax, dword [edi + 8]
add eax, ecx
cmp dword [ebp + 0xc], eax
jb 0x1003ff17
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 0x1003ff1f
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.1008b7e0
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 0x1003fe53
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 0x1003ff9d
cmp dword [ecx + 0xa4], 0
jne 0x1003ff2e
xor eax, eax
jmp 0x1003ffa2
push 0xd
call dword [sym.imp.KERNEL32.dll_SetLastError]
push ebx
call fcn.1003faa0
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 0x1003ff9d
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 0x1003ff8e
mov ebx, dword [ebp + 0xc]
nop dword [eax]
movzx eax, word [edx]
mov ecx, eax
and ecx, 0xf000
cmp ecx, 0x3000
jne 0x1003ff7e
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 0x1003ff60
mov eax, dword [edi + ecx]
add edi, ecx
mov edx, dword [ebp - 0xc]
test eax, eax
jne 0x1003ff42
mov ebx, dword [ebp - 0x14]
mov eax, 1
push ebx
mov dword [ebx + 0x18], eax
call fcn.1003af20
add esp, 4
test eax, eax
je 0x1003ff1f
push ebx
call fcn.1003b150
add esp, 4
test eax, eax
je 0x1003ff1f
mov eax, dword [ebx]
mov esi, dword [eax + 0xc0]
test esi, esi
je 0x1003fff5
mov edi, dword [ebx + 4]
mov esi, dword [esi + edi + 0xc]
test esi, esi
je 0x1003fff5
mov eax, dword [esi]
test eax, eax
je 0x1003fff5
push 0
push 1
push edi
call eax
mov eax, dword [esi + 4]
lea esi, [esi + 4]
test eax, eax
jne 0x1003ffe4
mov eax, dword [ebx]
mov eax, dword [eax + 0x28]
test eax, eax
je 0x1004003a
mov ecx, dword [ebp - 4]
add eax, ecx
cmp dword [ebx + 0x14], 0
je 0x1004002e
push 0
push 1
push ecx
call eax
test eax, eax
jne 0x1004001e
push 0x45a
jmp 0x1003ff19
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