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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
push esi
push edi
xor esi, esi
push esi
push esi
push 3
push esi
push 3
push SysReAllocString
push dword [ebp + 8]
mov dword [ebp - 4], esi
mov dword [ebp - 0xc], esi
mov dword [ebp - 8], esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x14], eax
cmp eax, 0xffffffff
jne 0x40566d
or dword [ebp - 4], eax
jmp 0x4057c0
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
cmp ebx, 0x40
jae 0x405688
mov dword [ebp - 4], 0xfffffffe
jmp 0x4057c0
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
mov dword [ebp - 0xc], edi
cmp edi, esi
jne 0x4056b3
mov dword [ebp - 4], 0xfffffffd
jmp 0x4057c0
push esi
lea eax, [ebp - 0x18]
push eax
push ebx
push edi
push dword [ebp - 0x14]
mov dword [ebp - 0x18], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4056d6
mov dword [ebp - 4], 0xfffffffc
jmp 0x4057c0
cmp dword [ebp - 0x18], ebx
je 0x4056e7
mov dword [ebp - 4], 0xfffffffb
jmp 0x4057c0
cmp dword [edi], 0x5243374b
je 0x4056fb
mov dword [ebp - 4], 0xfffffffa
jmp 0x4057c0
push dword [edi + 0xc]
lea eax, [ebx - 0x40]
push dword [edi + 8]
lea ecx, [edi + 0x40]
call fcn.004054fe
pop ecx
pop ecx
cmp eax, dword [edi + 0x10]
jne 0x405718
cmp edx, dword [edi + 0x14]
je 0x405724
mov dword [ebp - 4], 0xfffffff9
jmp 0x4057c0
push esi
lea eax, [ebp - 8]
push eax
xor edi, edi
inc edi
push edi
push dword [0x4990c4]
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x24], 0xc
call sub.ADVAPI32.dll_ConvertStringSecurityDescriptorToSecurityDescriptorA
test eax, eax
jne 0x405752
mov dword [ebp - 4], 0xffffff98
jmp 0x4057c0
mov eax, dword [ebp - 8]
mov dword [ebp - 0x10], edi
mov edi, str.GlobalK7CarnivoreV2
push edi
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [ebp - 0x20], eax
jmp 0x4057a4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x405827
cmp dword [ebp - 0x10], 3
ja 0x4057be
push dword [0x49c110]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
and dword [0x49c110], 0
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
inc dword [ebp - 0x10]
push edi
push ebx
push 0
push 4
lea eax, [ebp - 0x24]
push eax
push 0xffffffffffffffff
call esi
mov dword [0x49c110], eax
test eax, eax
jne 0x40576b
mov dword [ebp - 4], 0xffffff97
xor esi, esi
mov eax, dword [0x49c114]
cmp eax, esi
je 0x4057d6
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [0x49c114], esi
mov eax, dword [0x49c110]
cmp eax, esi
je 0x4057ec
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x49c110], esi
cmp dword [ebp - 8], esi
je 0x4057fa
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0xc], esi
je 0x405810
push dword [ebp - 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [ebp - 0x14], 0xffffffff
pop edi
pop esi
pop ebx
je 0x405822
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 4]
leave
ret
xor edi, edi
push edi
push edi
push edi
push 0xf001f
push dword [0x49c110]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov esi, eax
cmp esi, edi
jne 0x40584f
mov dword [ebp - 4], 0xffffff96
jmp 0x4057be
push ebx
push dword [ebp - 0xc]
push esi
call fcn.0046c470
add esp, 0xc
mov dword [0x49c114], esi
mov dword [ebp - 4], 1
xor esi, esi
jmp 0x4057ec