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

Disassembly:
sub esp, 0x24
jmp 0x402513
mov eax, dword [esp + 0x28]
cmp word [eax], 0x5a4d
je 0x40252f
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
add esp, 0x24
ret
push edi
mov edi, dword [eax + 0x3c]
add edi, eax
cmp dword [edi], 0x4550
jne 0x40254b
cmp word [edi + 4], 0x14c
jne 0x40254b
test byte [edi + 0x38], 1
je 0x40255d
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
add esp, 0x24
ret
push ebx
push ebp
je 0x40257e
jne 0x40257e
adc eax, esi
cmp dword [ebp + 0x238135ed], 0xffffffdd
cmp ebp, dword [edi]
pop ss
inc edx
mov eax, dword [ebx]
mov word [edx + 0x51], ss
or al, 0x8b
inc edi
push eax
mov eax, dword [edi + 0x50]
mov ecx, dword [edi + 0x34]
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push 4
push 0x3000
push eax
push ecx
call ebx
mov ebp, eax
test ebp, ebp
jne 0x4025dc
jnp 0x4025b7
jp 0x4025b7
dec ecx
sal dword [edi], 1
mov ecx, 0x345cea01
push ss
pop esi
sub al, 0x81
xor al, 0x34
pop edi
or ecx, dword [ebx + 0x46a5057]
mov edx, dword [edi + 0x50]
push 4
push 0x3000
push edx
push eax
call ebx
mov ebp, eax
test ebp, ebp
jne 0x4025dc
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop ebp
pop ebx
xor eax, eax
pop edi
add esp, 0x24
ret
push esi
push 0x34
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
jne 0x402613
push 0x8000
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop esi
pop ebp
pop ebx
xor eax, eax
pop edi
add esp, 0x24
ret
mov dword [esi + 4], ebp
movzx eax, word [edi + 0x16]
shr eax, 0xd
lea ecx, [esp + 0x10]
and eax, 1
push ecx
mov dword [esi + 0x14], eax
mov dword [esi + 0x1c], 0x4024c0
mov dword [esi + 0x20], 0x4024d0
mov dword [esi + 0x24], 0x4024f0
mov dword [esi + 0x28], 0
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
mov edx, dword [esp + 0x14]
mov dword [esi + 0x30], edx
jae 0x402667
jb 0x402667
cmp edi, edx
cmp al, 0xa9
mov ch, 0xc6
mov bx, 0x3014
mov eax, dword [edi + 0x54]
push 4
push 0x1000
push eax
push ebp
call ebx
mov ecx, dword [edi + 0x54]
mov edx, dword [esp + 0x38]
push ecx
mov ebx, eax
push edx
push ebx
call fcn.00423740
mov eax, dword [esp + 0x44]
mov ecx, dword [eax + 0x3c]
push esi
add ebx, ecx
push edi
mov dword [esi], ebx
push eax
mov dword [ebx + 0x34], ebp
call fcn.00401e00
add esp, 0x18
test eax, eax
je 0x402758
jb 0x4026ba
jae 0x4026ba
xor al, 0xe2
pop ebp
retf
mov eax, ebp
sub eax, dword [edi + 0x34]
je 0x4026d1
push eax
mov eax, esi
call fcn.00402210
add esp, 4
mov dword [esi + 0x18], eax
jmp 0x4026d8
mov dword [esi + 0x18], 1
call fcn.004022c0
test eax, eax
je 0x402758
push esi
call fcn.00401fe0
add esp, 4
test eax, eax
je 0x402758
jmp 0x402709
mov eax, esi
call fcn.004021c0
test eax, eax
je 0x402758
mov edx, dword [esi]
mov eax, dword [edx + 0x28]
test eax, eax
je 0x4027a5
add eax, ebp
cmp dword [esi + 0x14], 0
je 0x402798
jmp 0x402742
push 0
push 1
push ebp
call eax
test eax, eax
jne 0x402787
push 0x45a
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x402778
call fcn.004028e0
pop esi
pop ebp
pop ebx
xor eax, eax
pop edi
add esp, 0x24
ret
mov dword [esi + 0x10], 1
mov eax, esi
pop esi
pop ebp
pop ebx
pop edi
add esp, 0x24
ret
mov dword [esi + 0x2c], eax
mov eax, esi
pop esi
pop ebp
pop ebx
pop edi
add esp, 0x24
ret
mov dword [esi + 0x2c], 0
mov eax, esi
pop esi
pop ebp
pop ebx
pop edi
add esp, 0x24
ret