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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x15c
mov eax, dword [0x527040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov ebx, edx
mov dword [ebp - 0x11c], ecx
push edi
mov dword [ebp - 0x130], ebx
xor edi, edi
mov esi, 1
mov edx, 0x52a1cc
xor eax, eax
lock cmpxchg dword [edx], esi
test eax, eax
jne 0x402738
push 0x114
push eax
lea eax, [ebp - 0x118]
push eax
call fcn.00454f00
add esp, 0xc
push 0x51c574
push 0x51c584
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x402732
lea ecx, [ebp - 0x118]
push ecx
call eax
test eax, eax
jne 0x402732
mov eax, dword [ebp - 0x114]
mov dword [0x52a1b8], eax
mov eax, dword [ebp - 0x110]
mov dword [0x52a1c4], eax
call fcn.00402340
mov ecx, dword [ebp - 0x11c]
cmp ebx, 0x40
jb 0x402757
mov eax, 0x5a4d
cmp word [ecx], ax
jne 0x402c6a
mov eax, dword [ecx + 0x3c]
add eax, 0xf8
cmp ebx, eax
jae 0x40275e
push 0xd
jmp 0x402c6f
mov ebx, dword [ecx + 0x3c]
add ebx, ecx
mov dword [ebp - 0x124], ebx
cmp dword [ebx], 0x4550
jne 0x402c6a
mov eax, 0x14c
cmp word [ebx + 4], ax
jne 0x402c6a
mov eax, dword [ebx + 0x38]
mov dword [ebp - 0x120], eax
test al, 1
jne 0x402c6a
movzx ecx, word [ebx + 0x14]
movzx esi, word [ebx + 6]
add ecx, 0x24
test esi, esi
je 0x4027cd
add ecx, ebx
mov ebx, eax
mov eax, dword [ecx + 4]
mov edx, dword [ecx]
test eax, eax
jne 0x4027b6
lea eax, [edx + ebx]
jmp 0x4027b8
add eax, edx
cmp eax, edi
cmovbe eax, edi
add ecx, 0x28
mov edi, eax
sub esi, 1
jne 0x4027a8
mov ebx, dword [ebp - 0x124]
lea eax, [ebp - 0x15c]
push eax
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
mov ecx, dword [ebp - 0x158]
lea edx, [ecx - 1]
lea esi, [ecx - 1]
not edx
add esi, dword [ebx + 0x50]
lea eax, [ecx - 1]
add eax, edi
and esi, edx
and eax, edx
cmp esi, eax
jne 0x402c6a
mov edi, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push 4
push 0x3000
push esi
push dword [ebx + 0x34]
call edi
mov dword [ebp - 0x12c], eax
test eax, eax
jne 0x402837
push 4
push 0x3000
push esi
push eax
call edi
mov esi, eax
mov dword [ebp - 0x12c], esi
test esi, esi
jne 0x40283d
push 0xe
jmp 0x402c6f
mov esi, dword [ebp - 0x12c]
mov eax, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push 0x40
push 8
mov dword [ebp - 0x138], eax
call eax
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
mov dword [ebp - 0x134], edi
test edi, edi
jne 0x402875
push 0x8000
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push 0xe
jmp 0x402c6f
mov ecx, dword [ebp - 0x130]
mov dword [edi + 4], esi
movzx eax, word [ebx + 0x16]
shr eax, 0xd
and eax, 1
mov dword [edi + 0x1c], 0x402610
mov dword [edi + 0x14], eax
mov dword [edi + 0x20], 0x402630
mov dword [edi + 0x24], 0x402650
mov dword [edi + 0x28], 0x402660
mov dword [edi + 0x2c], 0x402680
mov dword [edi + 0x34], 0
mov eax, dword [ebp - 0x158]
mov dword [edi + 0x3c], eax
mov edx, dword [ebx + 0x54]
call fcn.00401d40
test eax, eax
je 0x402a38
push 4
push 0x1000
push dword [ebx + 0x54]
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push dword [ebx + 0x54]
mov esi, eax
push dword [ebp - 0x11c]
push esi
call fcn.00454400
mov eax, dword [ebp - 0x11c]
add esp, 0xc
mov ecx, dword [ebp - 0x12c]
mov dword [ebp - 0x120], 0
mov eax, dword [eax + 0x3c]
add eax, esi
xor esi, esi
mov dword [edi], eax
mov dword [eax + 0x34], ecx
mov eax, dword [edi]
mov edx, dword [edi + 4]
mov dword [ebp - 0x128], edx
movzx ecx, word [eax + 0x14]
add ecx, 0x24
cmp si, word [eax + 6]
jae 0x4029fe
lea ebx, [ecx + eax]
mov ecx, dword [ebx + 4]
test ecx, ecx
jne 0x402982
mov eax, dword [ebp - 0x124]
mov esi, dword [eax + 0x38]
test esi, esi
jle 0x4029da
push dword [edi + 0x34]
mov eax, dword [ebx]
push 4
push 0x1000
add eax, edx
push esi
push eax
mov eax, dword [edi + 0x1c]
call eax
add esp, 0x14
test eax, eax
je 0x402a38
mov eax, dword [ebx]
add eax, dword [ebp - 0x128]
push esi
push 0
push eax
mov dword [ebx - 4], eax
call fcn.00454f00
jmp 0x4029d1
mov eax, dword [ebx + 8]
add eax, ecx
cmp dword [ebp - 0x130], eax
jb 0x402a30
push dword [edi + 0x34]
mov eax, dword [ebx]
push 4
push 0x1000
add eax, edx
push ecx
push eax
mov eax, dword [edi + 0x1c]
call eax
add esp, 0x14
test eax, eax
je 0x402a38
push dword [ebx + 4]
mov eax, dword [ebx + 8]
mov esi, dword [ebx]
add eax, dword [ebp - 0x11c]
add esi, dword [ebp - 0x128]
push eax
push esi
call fcn.00454400
mov dword [ebx - 4], esi
mov edx, dword [ebp - 0x128]
add esp, 0xc
mov eax, dword [edi]
add ebx, 0x28
mov esi, dword [ebp - 0x120]
inc esi
mov dword [ebp - 0x120], esi
movzx eax, word [eax + 6]
cmp esi, eax
jl 0x402934
mov ebx, dword [ebp - 0x124]
mov ecx, dword [edi]
mov eax, dword [ecx + 0x34]
sub eax, dword [ebx + 0x34]
mov dword [ebp - 0x130], eax
je 0x402b46
mov eax, dword [ecx + 0xa0]
test eax, eax
je 0x402a38
cmp dword [ecx + 0xa4], 0
jne 0x402acb
xor eax, eax
jmp 0x402b4b
push 0xd
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp dword [edi + 0x10], 0
je 0x402a4f
mov eax, dword [edi]
mov ecx, dword [edi + 4]
push 0
push 0
mov eax, dword [eax + 0x28]
push ecx
add eax, ecx
call eax
push dword [edi + 0x30]
call fcn.0046be50
add esp, 4
cmp dword [edi + 8], 0
je 0x402a8e
xor esi, esi
cmp dword [edi + 0xc], esi
jle 0x402a83
mov eax, dword [edi + 8]
mov eax, dword [eax + esi*4]
test eax, eax
je 0x402a7d
push dword [edi + 0x34]
push eax
mov eax, dword [edi + 0x2c]
call eax
add esp, 8
inc esi
cmp esi, dword [edi + 0xc]
jl 0x402a67
push dword [edi + 8]
call fcn.0046be50
add esp, 4
mov eax, dword [edi + 4]
test eax, eax
je 0x402aa8
push dword [edi + 0x34]
push 0x8000
push 0
push eax
mov eax, dword [edi + 0x20]
call eax
add esp, 0x10
push edi
push 0
call dword [ebp - 0x138]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00450d40
mov esp, ebp
pop ebp
ret
mov ecx, dword [edi + 4]
mov dword [ebp - 0x124], ecx
lea ebx, [eax + ecx]
mov eax, dword [ebx]
test eax, eax
je 0x402b46
nop dword [eax]
add eax, ecx
lea edx, [ebx + 8]
mov ecx, dword [ebx + 4]
xor esi, esi
mov dword [ebp - 0x120], eax
lea eax, [ecx - 8]
test eax, 0xfffffffe
jbe 0x402b31
mov edi, dword [ebp - 0x120]
movzx eax, word [edx]
mov ecx, eax
and ecx, 0xf000
cmp ecx, 0x3000
jne 0x402b21
mov ecx, dword [ebp - 0x130]
and eax, 0xfff
add dword [eax + edi], ecx
mov ecx, dword [ebx + 4]
inc esi
add edx, 2
lea eax, [ecx - 8]
shr eax, 1
cmp esi, eax
jb 0x402b00
mov eax, dword [ebx + ecx]
add ebx, ecx
mov ecx, dword [ebp - 0x124]
test eax, eax
jne 0x402ae0
mov edi, dword [ebp - 0x134]
mov eax, 1
mov ecx, edi
mov dword [edi + 0x18], eax
call fcn.00402170
test eax, eax
je 0x402a38
mov ecx, edi
call fcn.00401f50
test eax, eax
je 0x402a38
mov ecx, dword [edi]
mov edx, ecx
mov esi, dword [ecx + 0xc0]
test esi, esi
je 0x402ba3
mov ebx, dword [edi + 4]
mov esi, dword [ebx + esi + 0xc]
test esi, esi
je 0x402ba3
mov eax, dword [esi]
test eax, eax
je 0x402ba3
nop dword [eax + eax]
push 0
push 1
push ebx
call eax
mov eax, dword [esi + 4]
lea esi, [esi + 4]
test eax, eax
jne 0x402b90
mov edx, dword [edi]
mov eax, dword [0x52a1b8]
cmp eax, 6
jne 0x402bd5
mov eax, dword [0x52a1c4]
cmp eax, 1
jne 0x402bd0
mov eax, dword [0x52a1c0]
test eax, eax
je 0x402bf4
push dword [edx + 0x50]
push dword [edi + 4]
push dword [0x52a1c8]
call eax
jmp 0x402bf4
cmp eax, 3
jmp 0x402be1
cmp eax, 0xa
jne 0x402bf4
cmp dword [0x52a1c4], 0
jne 0x402bf4
mov eax, dword [0x52a1bc]
test eax, eax
je 0x402bf4
mov edx, dword [edx + 0x50]
mov ecx, dword [edi + 4]
call eax
mov eax, dword [edi]
mov eax, dword [eax + 0x28]
test eax, eax
je 0x402c50
mov ecx, dword [ebp - 0x12c]
add eax, ecx
cmp dword [edi + 0x14], 0
je 0x402c3a
push 0
push 1
push ecx
call eax
test eax, eax
jne 0x402c20
push 0x45a
jmp 0x402a32
mov dword [edi + 0x10], 1
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00450d40
mov esp, ebp
pop ebp
ret
mov dword [edi + 0x38], eax
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00450d40
mov esp, ebp
pop ebp
ret
mov dword [edi + 0x38], 0
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00450d40
mov esp, ebp
pop ebp
ret
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.00450d40
mov esp, ebp
pop ebp
ret