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

Disassembly:
sub esp, 0x2c
push ebx
push ebp
push esi
mov ebx, edx
mov ebp, ecx
push 0x40
pop edx
mov ecx, ebx
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], ebp
xor esi, esi
call fcn.00421662
test eax, eax
jne 0x4210bc
xor eax, eax
jmp 0x4212c1
mov eax, 0x5a4d
cmp word [ebp], ax
je 0x4210d4
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x4210b5
mov edx, dword [ebp + 0x3c]
mov ecx, ebx
add edx, 0xf8
call fcn.00421662
test eax, eax
je 0x4210b5
mov ebx, dword [ebp + 0x3c]
add ebx, ebp
cmp dword [ebx], 0x4550
jne 0x4210c7
mov eax, 0x14c
cmp word [ebx + 4], ax
jne 0x4210c7
test byte [ebx + 0x38], 1
jne 0x4210c7
movzx edx, word [ebx + 6]
movzx eax, word [ebx + 0x14]
test edx, edx
je 0x421134
lea ecx, [ebx + 0x24]
add ecx, eax
cmp dword [ecx + 4], 0
mov eax, dword [ecx]
jne 0x421124
add eax, dword [ebx + 0x38]
jmp 0x421127
add eax, dword [ecx + 4]
cmp eax, esi
cmova esi, eax
add ecx, 0x28
sub edx, 1
jne 0x421117
push edi
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
mov ecx, dword [esp + 0x1c]
lea edx, [ecx - 1]
lea edi, [ecx - 1]
not edx
add edi, dword [ebx + 0x50]
lea eax, [ecx - 1]
add eax, esi
and edi, edx
and eax, edx
cmp edi, eax
je 0x42116c
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x4212be
mov esi, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push 4
push 0x3000
push edi
push dword [ebx + 0x34]
call esi
mov ebp, eax
test ebp, ebp
jne 0x42119a
push 4
push 0x3000
push edi
push eax
call esi
mov ebp, eax
test ebp, ebp
jne 0x42119a
push 0xe
jmp 0x421161
push 0x40
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
jne 0x4211c0
push 0x8000
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x421196
mov ecx, dword [esp + 0x14]
mov dword [edi + 4], ebp
movzx eax, word [ebx + 0x16]
and dword [edi + 0x34], 0
shr eax, 0xd
and eax, 1
mov dword [edi + 0x1c], 0x421325
mov dword [edi + 0x14], eax
mov dword [edi + 0x20], 0x421310
mov dword [edi + 0x24], 0x421303
mov dword [edi + 0x28], 0x4212f2
mov dword [edi + 0x2c], 0x4212e5
mov eax, dword [esp + 0x1c]
mov dword [edi + 0x3c], eax
mov edx, dword [ebx + 0x54]
call fcn.00421662
test eax, eax
je 0x4212b7
push 4
push 0x1000
push dword [ebx + 0x54]
push ebp
call esi
push dword [ebx + 0x54]
mov esi, eax
push dword [esp + 0x14]
push esi
call fcn.004207f0
mov eax, dword [esp + 0x1c]
add esp, 0xc
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
mov eax, dword [eax + 0x3c]
add eax, esi
mov dword [edi], eax
push edi
mov dword [eax + 0x34], ebp
call fcn.004215d7
test eax, eax
jne 0x4212b7
mov eax, dword [edi]
mov edx, dword [eax + 0x34]
sub edx, dword [ebx + 0x34]
je 0x42126a
mov ecx, edi
call fcn.0042146f
xor esi, esi
mov dword [edi + 0x18], eax
inc esi
jmp 0x421270
xor esi, esi
inc esi
mov dword [edi + 0x18], esi
mov ecx, edi
call fcn.0042133e
test eax, eax
je 0x4212b7
mov ecx, edi
call fcn.00421544
test eax, eax
jne 0x4212b7
mov ecx, edi
call fcn.00421513
test eax, eax
je 0x4212b7
mov eax, dword [edi]
mov eax, dword [eax + 0x28]
test eax, eax
je 0x4212d4
add eax, ebp
cmp dword [edi + 0x14], 0
je 0x4212cf
push 0
push esi
push ebp
call eax
test eax, eax
jne 0x4212ca
push 0x45a
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, edi
call fcn.00420ea7
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret 0x18
mov dword [edi + 0x10], esi
jmp 0x4212d8
mov dword [edi + 0x38], eax
jmp 0x4212d8
and dword [edi + 0x38], 0
mov eax, edi
jmp 0x4212c0