Function at 0x543c50
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 0x543dea
mov eax, dword [ebp + 8]
lea ebx, [edi + 0x10]
push eax
push ebx
call fcn.00544060
mov dword [edi + 8], 0
mov al, byte [0x81024c]
add esp, 8
lea esi, [edi + 0xc]
test al, al
je 0x543d39
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 0x543d19
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
test esi, esi
mov dword [esi], eax
jbe 0x543d12
push 4
push 0x1000
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
mov dword [ebp + 8], eax
je 0x543d03
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, 0x810240
call fcn.00543a60
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, 0x810240
call fcn.00543a60
test eax, eax
jne 0x543dd9
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 0x543dd4
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
test esi, esi
mov dword [esi], eax
jbe 0x543dcd
push 4
push 0x1000
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ebx, eax
test ebx, ebx
je 0x543dbe
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 0x543e56
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 0x543e4d
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.0052f4f0
add esp, 4
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 8