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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [0x463040]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0xc]
push ebx
push esi
push edi
mov edi, ecx
xor esi, esi
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x38], ecx
cmp edx, 0x40
jb 0x409b72
mov eax, 0x5a4d
cmp word [ecx], ax
jne 0x409fa1
mov eax, dword [ecx + 0x3c]
add eax, 0xf8
cmp edx, eax
jae 0x409b79
push 0xd
jmp 0x409fa6
mov ebx, dword [ecx + 0x3c]
add ebx, ecx
cmp dword [ebx], 0x4550
jne 0x409fa1
mov eax, 0x14c
cmp word [ebx + 4], ax
jne 0x409fa1
mov eax, dword [ebx + 0x38]
test al, 1
jne 0x409fa1
movzx ecx, word [ebx + 0x14]
movzx eax, word [ebx + 6]
add ecx, 0x24
test eax, eax
je 0x409be0
movzx edi, word [ebx + 6]
add ecx, ebx
nop dword [eax]
mov eax, dword [ecx + 4]
mov edx, dword [ecx]
test eax, eax
jne 0x409bcc
mov eax, dword [ebx + 0x38]
add eax, edx
cmp eax, esi
cmovbe eax, esi
add ecx, 0x28
mov esi, eax
sub edi, 1
jne 0x409bc0
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
mov ecx, dword [ebp - 0x24]
mov eax, dword [ebx + 0x50]
dec eax
add eax, ecx
lea edx, [ecx - 1]
not edx
and eax, edx
mov dword [ebp - 0x30], eax
lea eax, [ecx - 1]
add eax, esi
mov esi, dword [ebp - 0x30]
and eax, edx
cmp esi, eax
jne 0x409fa1
push 0
push 4
push 0x3000
push esi
push dword [ebx + 0x34]
call fcn.00409ab0
add esp, 0x14
mov dword [ebp - 0x3c], eax
test eax, eax
jne 0x409c4d
push eax
push 4
push 0x3000
push esi
push eax
call fcn.00409ab0
mov esi, eax
add esp, 0x14
mov dword [ebp - 0x3c], esi
test esi, esi
jne 0x409c4f
push 0xe
jmp 0x409fa6
mov esi, eax
push 0x40
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [edi], eax
test eax, eax
jne 0x409c7d
push eax
push 0x8000
push eax
push esi
call fcn.00409ad0
add esp, 0x10
push 0xe
jmp 0x409fa6
mov dword [eax + 4], esi
movzx ecx, word [ebx + 0x16]
mov eax, dword [edi]
shr ecx, 0xd
and ecx, 1
mov dword [eax + 0x14], ecx
mov eax, dword [edi]
mov dword [eax + 0x1c], fcn.00409ab0
mov eax, dword [edi]
mov dword [eax + 0x20], fcn.00409ad0
mov eax, dword [edi]
mov dword [eax + 0x24], 0x409af0
mov eax, dword [edi]
mov dword [eax + 0x28], 0x409b00
mov eax, dword [edi]
mov dword [eax + 0x2c], 0x409b20
mov eax, dword [edi]
mov dword [eax + 0x34], 0
mov ecx, dword [edi]
mov eax, dword [ebp - 0x24]
mov dword [ecx + 0x3c], eax
mov eax, dword [ebp + 0xc]
cmp eax, dword [ebx + 0x54]
jae 0x409ce9
push 0xd
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, edi
call fcn.00409ff0
jmp 0x409fac
push 0
push 4
push 0x1000
push dword [ebx + 0x54]
push esi
call fcn.00409ab0
push dword [ebx + 0x54]
mov esi, eax
push dword [ebp - 0x38]
push esi
call fcn.004376f0
mov eax, dword [ebp - 0x38]
add esp, 0x20
mov dword [ebp - 0x30], 0
mov ecx, dword [eax + 0x3c]
mov eax, dword [edi]
add ecx, esi
mov dword [eax], ecx
mov eax, dword [edi]
mov ecx, dword [ebp - 0x3c]
mov eax, dword [eax]
mov dword [eax + 0x34], ecx
mov edx, dword [edi]
mov eax, dword [edx]
mov esi, dword [edx + 4]
mov dword [ebp - 0x34], esi
xor esi, esi
movzx ecx, word [eax + 0x14]
add ecx, 0x24
cmp si, word [eax + 6]
mov esi, dword [ebp - 0x34]
jae 0x409e15
lea edi, [ecx + eax]
nop dword [eax]
mov ecx, dword [edi + 4]
test ecx, ecx
jne 0x409d92
mov esi, dword [ebx + 0x38]
test esi, esi
jle 0x409dda
push dword [edx + 0x34]
mov eax, dword [edi]
add eax, dword [ebp - 0x34]
mov ecx, dword [edx + 0x1c]
push 4
push 0x1000
push esi
push eax
call ecx
add esp, 0x14
test eax, eax
je 0x409e03
mov eax, dword [edi]
add eax, dword [ebp - 0x34]
push esi
push 0
push eax
mov dword [edi - 4], eax
call fcn.00437590
jmp 0x409dd7
mov eax, dword [edi + 8]
add eax, ecx
cmp dword [ebp + 0xc], eax
jb 0x409dfb
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax]
push dword [eax + 0x34]
mov ecx, dword [eax + 0x1c]
mov eax, dword [edi]
push 4
push 0x1000
push dword [edi + 4]
add eax, esi
push eax
call ecx
add esp, 0x14
test eax, eax
je 0x409e03
push dword [edi + 4]
mov eax, dword [edi + 8]
mov esi, dword [edi]
add eax, dword [ebp - 0x38]
add esi, dword [ebp - 0x34]
push eax
push esi
call fcn.004376f0
mov dword [edi - 4], esi
add esp, 0xc
mov eax, dword [ebp - 0x2c]
add edi, 0x28
mov ecx, dword [ebp - 0x30]
inc ecx
mov dword [ebp - 0x30], ecx
mov edx, dword [eax]
mov eax, dword [edx]
movzx eax, word [eax + 6]
cmp ecx, eax
jge 0x409e12
mov esi, dword [ebp - 0x34]
jmp 0x409d50
push 0xd
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edi, dword [ebp - 0x2c]
mov ecx, edi
call fcn.00409ff0
jmp 0x409fac
mov edi, dword [ebp - 0x2c]
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 0x34]
sub eax, dword [ebx + 0x34]
mov dword [ebp - 0x30], eax
je 0x409eba
cmp dword [edx + 0xa4], 0
jne 0x409e3b
xor eax, eax
mov dword [ecx + 0x18], eax
jmp 0x409ec1
mov ebx, dword [ecx + 4]
mov edi, dword [edx + 0xa0]
add edi, ebx
mov dword [ebp - 0x38], ebx
mov eax, dword [edi]
test eax, eax
je 0x409ead
nop
mov ecx, dword [edi + 4]
lea edx, [edi + 8]
add ebx, eax
xor esi, esi
lea eax, [ecx - 8]
test eax, 0xfffffffe
jbe 0x409e92
movzx eax, word [edx]
mov ecx, eax
and ecx, 0xf000
cmp ecx, 0x3000
jne 0x409e82
mov ecx, dword [ebp - 0x30]
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 0x409e64
mov eax, dword [edi + ecx]
add edi, ecx
mov ebx, dword [ebp - 0x38]
test eax, eax
jne 0x409e50
mov edi, dword [ebp - 0x2c]
mov eax, 1
mov ecx, dword [edi]
mov dword [ecx + 0x18], eax
jmp 0x409ec1
mov edi, dword [ebp - 0x2c]
mov eax, 1
mov dword [ecx + 0x18], eax
jmp 0x409ec1
mov dword [ecx + 0x18], 1
mov ecx, edi
call fcn.00409930
test eax, eax
je 0x409e06
mov ecx, edi
call fcn.004097f0
test eax, eax
je 0x409e06
mov ebx, dword [edi]
mov eax, dword [ebx]
mov esi, dword [eax + 0xc0]
test esi, esi
je 0x409f11
mov ebx, dword [ebx + 4]
mov esi, dword [esi + ebx + 0xc]
test esi, esi
je 0x409f11
mov eax, dword [esi]
test eax, eax
je 0x409f11
nop
push 0
push 1
push ebx
call eax
mov eax, dword [esi + 4]
lea esi, [esi + 4]
test eax, eax
jne 0x409f00
mov ecx, dword [edi]
mov eax, dword [ecx]
mov eax, dword [eax + 0x28]
test eax, eax
je 0x409f82
mov edx, dword [ebp - 0x3c]
add eax, edx
cmp dword [ecx + 0x14], 0
je 0x409f67
push 0
push 1
push edx
call eax
test eax, eax
jne 0x409f46
push 0x45a
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, edi
call fcn.00409ff0
jmp 0x409fac
mov eax, dword [edi]
pop edi
pop esi
pop ebx
mov dword [eax + 0x10], 1
mov eax, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0043435c
mov esp, ebp
pop ebp
ret 0x20
pop edi
pop esi
mov dword [ecx + 0x38], eax
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0043435c
mov esp, ebp
pop ebp
ret 0x20
pop edi
pop esi
mov dword [ecx + 0x38], 0
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0043435c
mov esp, ebp
pop ebp
ret 0x20
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0043435c
mov esp, ebp
pop ebp
ret 0x20