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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x60a070]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
push edi
mov edi, ecx
mov dword [ebp - 0x18], eax
cmp dword [edi], 0
jne 0x54cb59
call fcn.00546300
push str.file_handler_to_read_not_initialized
push eax
mov ecx, dword [eax]
call dword [ecx + 4]
add esp, 8
xor al, al
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0055eeb4
mov esp, ebp
pop ebp
ret 0x10
push esi
lea esi, [edi + 8]
mov ecx, esi
mov dword [ebp - 0x1c], esi
call fcn.0054ad40
lea eax, [ebp - 0xc]
push eax
push dword [edi]
call dword [sym.imp.KERNEL32.DLL_GetFileSizeEx]
test eax, eax
jne 0x54cbcf
call fcn.00546300
cmp dword [edi + 0xac], 8
lea ecx, [edi + 0x98]
mov edx, eax
jb 0x54cb8f
mov ecx, dword [ecx]
mov eax, dword [edx]
push ecx
push str.failed_to_get_the_file_size_of__s
push 0x5c0ec0
push edx
call dword [eax + 0x24]
add esp, 0x10
mov dword [edi + 0x24], 1
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov ecx, esi
mov dword [edi + 0x28], eax
call fcn.0054ad60
pop esi
pop edi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0055eeb4
mov esp, ebp
pop ebp
ret 0x10
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp - 8]
mov ecx, dword [ebp + 0x10]
mov esi, dword [ebp - 0xc]
cmp edx, eax
jb 0x54cc1a
ja 0x54cbe5
cmp ecx, esi
jb 0x54cc1a
call fcn.00546300
push str.start_address_to_read_the_file_is_past_the_file_size.
push 0x5c0ec0
push eax
mov ecx, dword [eax]
call dword [ecx + 0x24]
mov ecx, dword [ebp - 0x1c]
add esp, 0xc
call fcn.0054ad60
pop esi
pop edi
mov al, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0055eeb4
mov esp, ebp
pop ebp
ret 0x10
push 0
push 0
push edx
sub esi, ecx
push ecx
push dword [edi]
sbb eax, edx
mov dword [ebp - 0x20], eax
call dword [sym.imp.KERNEL32.DLL_SetFilePointerEx]
test eax, eax
je 0x54cd09
lea eax, [esi + 1]
mov dword [ebp - 0x10], 0
push eax
call fcn.0055f6c6
add esp, 4
mov dword [ebx], eax
lea ecx, [ebp - 0x10]
push 0
push ecx
push esi
push eax
push dword [edi]
call dword [sym.imp.KERNEL32.DLL_ReadFile]
mov dword [ebp - 0x14], eax
test eax, eax
mov eax, dword [sym.imp.KERNEL32.DLL_GetLastError]
jne 0x54cc9f
call eax
cmp eax, 0x26
mov eax, dword [sym.imp.KERNEL32.DLL_GetLastError]
jne 0x54cc9f
call eax
cmp eax, 0x26
jne 0x54cd3c
mov ecx, dword [ebx]
lea edi, [eax - 0x25]
mov eax, dword [ebp - 0x10]
mov byte [eax + ecx], 0
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x10]
mov dword [ecx], eax
mov dword [ecx + 4], 0
jmp 0x54cd3f
xor ecx, ecx
cmp dword [ebp - 0x10], esi
jne 0x54ccc4
cmp ecx, dword [ebp - 0x20]
jne 0x54ccc4
mov eax, dword [ebx]
lea edi, [ecx + 1]
mov byte [esi + eax], cl
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x10]
mov dword [ecx], eax
mov dword [ecx + 4], 0
jmp 0x54cd3f
mov dword [edi + 0x24], 1
call eax
mov dword [edi + 0x28], eax
call fcn.00546300
mov esi, eax
mov eax, dword [sym.imp.KERNEL32.DLL_GetLastError]
mov edi, dword [esi]
call eax
push eax
push str.failed_to_read_data._Error_code____d
push 0x5c0ec0
push esi
call dword [edi + 0x24]
mov esi, dword [ebx]
push esi
call fcn.0055eec5
mov edi, dword [ebp - 0x14]
add esp, 0x14
test esi, esi
je 0x54cd3f
mov dword [ebx], 0x8123
jmp 0x54cd3f
mov esi, dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [edi + 0x24], 1
call esi
mov dword [edi + 0x28], eax
call fcn.00546300
mov edi, eax
mov ebx, dword [edi]
call esi
push eax
push str.file_pointer_set_error____d
push 0x5c0ec0
push edi
call dword [ebx + 0x24]
add esp, 0x10
xor edi, edi
jmp 0x54cd3f
mov edi, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x1c]
call fcn.0054ad60
mov ecx, dword [ebp - 4]
xor eax, eax
cmp edi, 1
pop esi
sete al
xor ecx, ebp
pop edi
pop ebx
call fcn.0055eeb4
mov esp, ebp
pop ebp
ret 0x10