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

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
mov edi, ecx
test eax, eax
mov dword [ebp - 4], edi
jne 0x546c2a
mov eax, dword [ebp + 8]
lea ebx, [edi + 0x10]
push eax
push ebx
call fcn.00546ea0
mov dword [edi + 8], 0
mov al, byte [0x81465c]
add esp, 8
lea esi, [edi + 0xc]
test al, al
je 0x546b79
push 0
push 0x80
push 3
push 0
push 1
push Ordinal_4
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x546b59
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
test esi, esi
mov dword [esi], eax
jbe 0x546b52
push 4
push 0x1000
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
mov dword [ebp + 8], eax
je 0x546b43
mov edx, dword [esi]
lea ecx, [ebp + 0xc]
push 0
push ecx
push edx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebp - 4]
mov eax, dword [ebp + 8]
test eax, eax
mov dword [edi + 4], eax
pop edi
pop esi
pop ebx
setne al
mov esp, ebp
pop ebp
ret 8
push 0x8000
push 0
push 0
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
push ebx
mov ecx, 0x814650
call fcn.005468a0
mov edi, dword [ebp - 4]
test eax, eax
mov dword [edi + 4], eax
pop edi
pop esi
pop ebx
setne al
mov esp, ebp
pop ebp
ret 8
push esi
push ebx
mov ecx, 0x814650
call fcn.005468a0
test eax, eax
jne 0x546c19
push eax
push 0x80
push 3
push eax
push 1
push Ordinal_4
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x546c14
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
test esi, esi
mov dword [esi], eax
jbe 0x546c0d
push 4
push 0x1000
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ebx, eax
test ebx, ebx
je 0x546bfe
mov ecx, dword [esi]
lea eax, [ebp + 8]
push 0
push eax
push ecx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebp - 4]
mov eax, ebx
test eax, eax
mov dword [edi + 4], eax
pop edi
pop esi
pop ebx
setne al
mov esp, ebp
pop ebp
ret 8
push 0x8000
push 0
push 0
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebp - 4]
xor eax, eax
mov dword [edi + 4], eax
pop edi
test eax, eax
pop esi
pop ebx
setne al
mov esp, ebp
pop ebp
ret 8
test al, 1
je 0x546c96
mov edx, dword [ebp + 8]
lea ebx, [edi + 0x10]
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
push 0
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x80
mov eax, ecx
mov esi, edi
mov edi, ebx
push 2
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push 0
and ecx, 3
push 1
push 0xc0000000
push edx
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, dword [ebp - 4]
cmp eax, 0xffffffff
mov dword [esi], eax
je 0x546c8d
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esi + 0xc], eax
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret 8
push ebx
call fcn.00531ef0
add esp, 4
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 8