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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov eax, dword [0x44f00c]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x40], edx
xor esi, esi
mov dword [ebp - 0x2c], edi
cmp ebx, 0x40
jb 0x414593
mov eax, 0x5a4d
cmp word [edx], ax
jne 0x4149c3
mov ecx, dword [edx + 0x3c]
lea eax, [ecx + 0xf8]
cmp ebx, eax
jae 0x41459a
push 0xd
jmp 0x4149c8
cmp dword [ecx + edx], 0x4550
lea ebx, [ecx + edx]
jne 0x4149c3
mov eax, 0x14c
cmp word [ebx + 4], ax
jne 0x4149c3
mov ecx, dword [ebx + 0x38]
test cl, 1
jne 0x4149c3
movzx edx, word [ebx + 0x14]
movzx eax, word [ebx + 6]
add edx, 0x24
test eax, eax
je 0x414600
movzx edi, word [ebx + 6]
add edx, ebx
nop word [eax + eax]
mov eax, dword [edx + 4]
lea edx, [edx + 0x28]
test eax, eax
cmovne ecx, eax
add ecx, dword [edx - 0x28]
cmp ecx, esi
cmovbe ecx, esi
mov esi, ecx
mov ecx, dword [ebx + 0x38]
sub edi, 1
jne 0x4145e0
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 0x4149c3
push 4
push 0x3000
push esi
push dword [ebx + 0x34]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0x38], eax
test eax, eax
jne 0x414666
push 4
push 0x3000
push esi
mov esi, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push eax
call esi
mov dword [ebp - 0x38], eax
test eax, eax
jne 0x41466c
push 0xe
jmp 0x4149c8
mov esi, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
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 0x41469a
mov ecx, dword [ebp - 0x38]
push 0x8000
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push 0xe
jmp 0x4149c8
mov edx, dword [ebp - 0x38]
mov dword [eax + 4], edx
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], 0x4144d0
mov eax, dword [edi]
mov dword [eax + 0x20], 0x4144f0
mov eax, dword [edi]
mov dword [eax + 0x24], 0x414510
mov eax, dword [edi]
mov dword [eax + 0x28], 0x414520
mov eax, dword [edi]
mov dword [eax + 0x2c], 0x414540
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 [ebx + 0x54]
cmp dword [ebp + 0xc], eax
jae 0x414709
push 0xd
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, edi
call fcn.00414b80
jmp 0x4149ce
push 4
push 0x1000
push eax
push edx
call esi
push dword [ebx + 0x54]
mov esi, eax
push dword [ebp - 0x40]
push esi
call fcn.0041c3b0
mov eax, dword [ebp - 0x40]
add esp, 0xc
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 - 0x38]
mov eax, dword [eax]
mov dword [eax + 0x34], ecx
mov ecx, dword [edi]
mov eax, dword [ecx]
mov esi, dword [ecx + 4]
mov dword [ebp - 0x34], esi
xor esi, esi
movzx edx, word [eax + 0x14]
add edx, eax
cmp si, word [eax + 6]
mov esi, dword [ebp - 0x34]
jae 0x414823
mov eax, ecx
lea edi, [edx + 0x24]
mov dword [ebp - 0x3c], eax
nop dword [eax]
mov edx, dword [edi + 4]
test edx, edx
jne 0x4147b5
mov esi, dword [ebx + 0x38]
test esi, esi
jle 0x4147fa
push dword [eax + 0x34]
mov eax, dword [edi]
add eax, dword [ebp - 0x34]
push 4
push 0x1000
push esi
push eax
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + 0x1c]
call eax
add esp, 0x14
test eax, eax
je 0x414852
mov eax, dword [edi]
add eax, dword [ebp - 0x34]
push esi
push 0
push eax
mov dword [edi - 4], eax
call fcn.0041c210
jmp 0x4147f7
mov eax, dword [edi + 8]
add eax, edx
cmp dword [ebp + 0xc], eax
jb 0x41484a
push dword [ecx + 0x34]
mov eax, dword [edi]
push 4
push 0x1000
add eax, esi
push edx
push eax
mov eax, dword [ecx + 0x1c]
call eax
add esp, 0x14
test eax, eax
je 0x414852
push dword [edi + 4]
mov eax, dword [edi + 8]
mov esi, dword [edi]
add eax, dword [ebp - 0x40]
add esi, dword [ebp - 0x34]
push eax
push esi
call fcn.0041c3b0
mov dword [edi - 4], esi
add esp, 0xc
mov eax, dword [ebp - 0x2c]
add edi, 0x28
mov edx, dword [ebp - 0x30]
inc edx
mov dword [ebp - 0x30], edx
mov ecx, dword [eax]
mov dword [ebp - 0x3c], ecx
mov eax, dword [ecx]
movzx eax, word [eax + 6]
cmp edx, eax
jge 0x414820
mov esi, dword [ebp - 0x34]
mov eax, ecx
jmp 0x414770
mov edi, dword [ebp - 0x2c]
mov edx, dword [ecx]
mov eax, dword [edx + 0x34]
sub eax, dword [ebx + 0x34]
mov dword [ebp - 0x30], eax
je 0x4148dc
cmp dword [edx + 0xa4], 0
jne 0x414861
mov edi, dword [ebp - 0x2c]
xor eax, eax
mov dword [ecx + 0x18], eax
jmp 0x4148e3
push 0xd
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edi, dword [ebp - 0x2c]
mov ecx, edi
call fcn.00414b80
jmp 0x4149ce
mov ebx, dword [ecx + 4]
mov edi, dword [edx + 0xa0]
add edi, ebx
mov dword [ebp - 0x3c], ebx
mov eax, dword [edi]
test eax, eax
je 0x4148cf
mov ecx, dword [edi + 4]
lea edx, [edi + 8]
add ebx, eax
xor esi, esi
lea eax, [ecx - 8]
test eax, 0xfffffffe
jbe 0x4148be
nop dword [eax]
movzx eax, word [edx]
mov ecx, eax
and ecx, 0xf000
cmp ecx, 0x3000
jne 0x4148ae
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 0x414890
mov eax, dword [edi + ecx]
add edi, ecx
mov ebx, dword [ebp - 0x3c]
test eax, eax
jne 0x414875
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax]
mov edi, dword [ebp - 0x2c]
mov eax, 1
mov dword [ecx + 0x18], eax
jmp 0x4148e3
mov dword [ecx + 0x18], 1
mov ecx, edi
call fcn.00414340
test eax, eax
je 0x414855
mov ecx, edi
call fcn.004141e0
test eax, eax
je 0x414855
mov edx, dword [edi]
mov ecx, edx
mov eax, dword [edx]
mov esi, dword [eax + 0xc0]
test esi, esi
je 0x414935
mov ebx, dword [edx + 4]
mov esi, dword [esi + ebx + 0xc]
test esi, esi
je 0x414935
mov eax, dword [esi]
test eax, eax
je 0x414935
push 0
push 1
push ebx
call eax
mov eax, dword [esi + 4]
lea esi, [esi + 4]
test eax, eax
jne 0x414922
mov ecx, dword [edi]
mov eax, dword [ecx]
mov eax, dword [eax + 0x28]
test eax, eax
je 0x4149a4
mov edx, dword [ebp - 0x38]
add eax, edx
cmp dword [ecx + 0x14], 0
je 0x414989
push 0
push 1
push edx
call eax
test eax, eax
jne 0x414968
push 0x45a
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, edi
call fcn.00414b80
jmp 0x4149ce
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.004192ef
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.004192ef
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.004192ef
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.004192ef
mov esp, ebp
pop ebp
ret 0x20