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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
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 - 8], esi
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
or edi, 0xffffffff
mov dword [ebp - 0x10], eax
cmp eax, edi
je 0x4058e4
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
cmp ebx, 0x40
jae 0x40594a
push 0xfffffffffffffffe
pop edi
mov eax, dword [0x49c11c]
cmp eax, esi
je 0x4058fa
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [0x49c11c], esi
mov eax, dword [0x49c118]
cmp eax, esi
je 0x405910
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x49c118], esi
cmp dword [ebp - 4], esi
je 0x40591e
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 8], esi
je 0x405934
push dword [ebp - 8]
push esi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [ebp - 0x10], 0xffffffff
je 0x405943
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret
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 - 8], edi
cmp edi, esi
jne 0x405970
push 0xfffffffffffffffd
jmp 0x4058e3
push esi
lea eax, [ebp - 0x14]
push eax
push ebx
push edi
push dword [ebp - 0x10]
mov dword [ebp - 0x14], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40598e
push 0xfffffffffffffffc
jmp 0x4058e3
cmp dword [ebp - 0x14], ebx
je 0x40599a
push 0xfffffffffffffffb
jmp 0x4058e3
cmp dword [edi], 0x5243374b
je 0x4059a9
push 0xfffffffffffffffa
jmp 0x4058e3
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 0x4059c6
cmp edx, dword [edi + 0x14]
je 0x4059cd
push 0xfffffffffffffff9
jmp 0x4058e3
push esi
lea eax, [ebp - 4]
push eax
xor edi, edi
inc edi
push edi
push dword [0x4990c4]
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x20], 0xc
call sub.ADVAPI32.dll_ConvertStringSecurityDescriptorToSecurityDescriptorA
test eax, eax
jne 0x4059f9
push 0xffffffffffffff98
jmp 0x4058e3
mov eax, dword [ebp - 4]
mov dword [ebp - 0xc], edi
mov edi, str.GlobalK7CarnivoreExclV2
push edi
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [ebp - 0x1c], eax
jmp 0x405a47
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x405a64
cmp dword [ebp - 0xc], 3
ja 0x405a5a
push dword [0x49c118]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
and dword [0x49c118], 0
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
inc dword [ebp - 0xc]
push edi
push ebx
push 0
push 4
lea eax, [ebp - 0x20]
push eax
push 0xffffffffffffffff
call esi
mov dword [0x49c118], eax
test eax, eax
jne 0x405a12
push 0xffffffffffffff97
pop edi
xor esi, esi
jmp 0x4058e4
xor edi, edi
push edi
push edi
push edi
push 0xf001f
push dword [0x49c118]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov esi, eax
cmp esi, edi
jne 0x405a84
push 0xffffffffffffff96
jmp 0x405a5c
push ebx
push dword [ebp - 8]
push esi
call fcn.0046c470
xor edi, edi
add esp, 0xc
mov dword [0x49c11c], esi
inc edi
xor esi, esi
jmp 0x405910