Function at 0x40a450
Capabilities:
Get file size
Get system information on windows

Disassembly:
sub esp, 0x74
push ebx
push ebp
xor ebp, ebp
cmp eax, 0xc0000001
push esi
mov esi, edx
mov ebx, ecx
mov dword [esi], ebp
mov dword [esi + 4], ebp
mov dword [esi + 8], ebp
mov dword [esi + 0xc], ebp
mov dword [esi + 0x10], ebp
mov dword [esi + 0x14], ebp
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], 0xffffffff
mov ecx, dword [ebx]
push edi
jg 0x40a4ad
je 0x40a49e
cmp eax, 0x80000000
je 0x40a4dd
cmp eax, 0xc0000000
jne 0x40a4b4
lea edi, [ebp + 4]
mov dword [esp + 0x14], 2
jmp 0x40a4ea
mov edi, 8
mov dword [esp + 0x14], 1
jmp 0x40a4ea
cmp eax, 0xc0000002
je 0x40a4dd
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x24]
mov dword [esp + 0x24], ebp
mov dword [esp + 0x28], 0x11
call fcn.00405c20
push 0x44b4b4
lea ecx, [esp + 0x54]
push ecx
call fcn.00429d3b
mov edi, 2
mov dword [esp + 0x14], 4
lea edx, [esp + 0x20]
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x40a528
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea eax, [esp + 0x18]
call fcn.00405b50
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x1c]
call fcn.00405c20
push 0x44b4b4
lea ecx, [esp + 0x54]
push ecx
call fcn.00429d3b
cmp dword [esp + 0x24], ebp
ja 0x40a535
cmp dword [esp + 0x20], 0xffffffff
jbe 0x40a55e
lea edx, [esp + 0x50]
push edx
lea ecx, [esp + 0x1c]
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x20], 0x12
call fcn.00405c20
push 0x44b4b4
lea eax, [esp + 0x54]
push eax
call fcn.00429d3b
mov eax, dword [ebx]
push ebp
push ebp
push ebp
push edi
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [esp + 0x18], eax
cmp eax, ebp
jne 0x40a5a7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea eax, [esp + 0x20]
call fcn.00405b50
call fcn.00406d30
lea ecx, [esp + 0x50]
push ecx
lea ecx, [esp + 0x24]
call fcn.00405c20
push 0x44b4b4
lea edx, [esp + 0x54]
push edx
call fcn.00429d3b
lea eax, [esp + 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ebx, dword [esp + 0x48]
push ebp
push ebx
push ebp
push ebp
call fcn.004297c0
push ebp
push ebx
push edx
mov edi, eax
push eax
imul edi, ebx
call fcn.00428840
mov ecx, edx
sar ecx, 0x1f
neg eax
mov ebx, edx
adc edx, ebp
mov dword [esi + 0x10], eax
mov eax, dword [esp + 0x20]
neg edx
mov dword [esi + 0x14], edx
mov dword [esi + 8], ebp
mov dword [esi + 0xc], ebp
mov dword [esi + 4], eax
cmp eax, ebp
je 0x40a5f8
mov ecx, dword [esi + 0x10]
add ecx, eax
jmp 0x40a5fa
xor ecx, ecx
mov edx, dword [esp + 0x14]
push ebp
push ecx
push edi
mov edi, dword [esp + 0x24]
push ebx
push edx
push edi
call dword [sym.imp.KERNEL32.dll_MapViewOfFileEx]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi], eax
call edi
mov eax, dword [esi]
cmp eax, ebp
jne 0x40a68e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x20], eax
mov ecx, 0x448580
mov edi, edi
cmp eax, dword [ecx]
je 0x40a689
add ecx, 8
cmp ecx, str.Advapi32.dll
jne 0x40a630
mov ecx, 1
mov eax, dword [esi]
mov dword [esp + 0x24], ecx
cmp eax, ebp
je 0x40a65a
sub eax, dword [esi + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [esi], ebp
mov eax, dword [esi + 0x1c]
cmp eax, 0xffffffff
je 0x40a66c
push eax
call edi
mov dword [esi + 0x1c], 0xffffffff
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x24]
call fcn.00405c20
push 0x44b4b4
lea ecx, [esp + 0x54]
push ecx
call fcn.00429d3b
mov ecx, dword [ecx + 4]
jmp 0x40a644
mov edx, dword [esi + 0x10]
add edx, eax
pop edi
mov dword [esi], edx
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x74
ret