Function at 0x407952
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
push edi
xor edi, edi
xor esi, esi
and dword [ebp - 4], esi
push edi
push edi
push 3
push edi
push 3
push SysReAllocString
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x10], eax
cmp eax, 0xffffffff
jne 0x407984
or esi, eax
jmp 0x407ae5
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
cmp ebx, 0x40
jae 0x40799b
push 0xfffffffffffffffe
jmp 0x407ae4
lea eax, [ebx + 0x400]
push eax
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 0x4079be
push 0xfffffffffffffffd
jmp 0x407ae4
push 0
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], ebx
push eax
push ebx
push edi
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4079dd
push 0xfffffffffffffffc
jmp 0x407ae4
cmp dword [ebp - 0xc], ebx
je 0x4079e9
push 0xfffffffffffffffb
jmp 0x407ae4
cmp dword [edi], 0x5243374b
je 0x4079f8
push 0xfffffffffffffffa
jmp 0x407ae4
push dword [edi + 0xc]
lea edx, [ebx - 0x40]
push dword [edi + 8]
lea ecx, [edi + 0x40]
call fcn.0040780e
pop ecx
pop ecx
cmp eax, dword [edi + 0x10]
jne 0x407ae2
cmp edx, dword [edi + 0x14]
jne 0x407ae2
xor eax, eax
mov dword [ebp - 0x1c], 0xc
push eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], eax
lea eax, [ebp - 4]
push eax
push 1
push dword [0x51aeb0]
call dword [sym.imp.ADVAPI32.dll_ConvertStringSecurityDescriptorToSecurityDescriptorA]
test eax, eax
jne 0x407a4a
push 0xffffffffffffff98
jmp 0x407ae4
mov eax, dword [ebp - 4]
mov dword [ebp - 0x18], eax
mov dword [ebp - 8], 1
jmp 0x407a89
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x407aac
cmp dword [ebp - 8], 3
ja 0x407ae5
push dword [0x52a8bc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
and dword [0x52a8bc], esi
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
inc dword [ebp - 8]
push str.GlobalK7CarnivoreV2
push ebx
push 0
push 4
lea eax, [ebp - 0x1c]
push eax
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [0x52a8bc], eax
test eax, eax
jne 0x407a59
push 0xffffffffffffff97
jmp 0x407ae4
xor eax, eax
push eax
push eax
push eax
push 0xf001f
push dword [0x52a8bc]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov esi, eax
test esi, esi
jne 0x407acc
push 0xffffffffffffff96
jmp 0x407ae4
push ebx
push edi
push esi
call fcn.0049f810
mov dword [0x52a8c0], esi
add esp, 0xc
xor esi, esi
inc esi
jmp 0x407b13
push 0xfffffffffffffff9
pop esi
mov eax, dword [0x52a8c0]
test eax, eax
je 0x407afc
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
and dword [0x52a8c0], 0
mov eax, dword [0x52a8bc]
test eax, eax
je 0x407b13
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
and dword [0x52a8bc], 0
cmp dword [ebp - 4], 0
je 0x407b22
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_LocalFree]
test edi, edi
je 0x407b36
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 0x10]
cmp eax, 0xffffffff
je 0x407b45
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret