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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov edx, dword [edi]
sub esp, 0x28
push ebx
mov ebx, dword [ebp + 8]
push esi
xor esi, esi
push esi
lea eax, [esp + 0x14]
push eax
push 4
lea ecx, [esp + 0x18]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x10]
sub dword [edi + 8], eax
cmp eax, 4
jne 0x5e422d
lea eax, [esp + 0x28]
mov dword [ebx + 0x1c], esi
mov ecx, dword [edi]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x5e4071
mov dword [esp + 0x24], esi
jmp 0x5e407d
mov edx, dword [esp + 0x2c]
mov esi, dword [esp + 0x28]
mov dword [esp + 0x24], edx
push edi
call fcn.0048b230
sub esi, eax
mov dword [esp + 0x1c], esi
lea esp, [esp]
mov ecx, dword [esp + 0xc]
mov eax, ecx
or eax, 0xff000000
cmp eax, 0xff334449
jne 0x5e4188
mov eax, dword [edi]
push 0
lea ecx, [esp + 0x14]
push ecx
push 6
lea edx, [esp + 0x34]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x10]
sub dword [edi + 8], eax
cmp eax, 6
jne 0x5e422d
add dword [ebx + 0x1c], eax
cmp byte [esp + 0x28], 0xff
jae 0x5e4184
cmp byte [esp + 0x29], 0xff
jae 0x5e4184
mov dl, byte [esp + 0x2a]
cmp dl, 0x80
jae 0x5e4184
cmp byte [esp + 0x2b], 0x80
jae 0x5e4184
mov cl, byte [esp + 0x2c]
cmp cl, 0x80
jae 0x5e4184
mov al, byte [esp + 0x2d]
cmp al, 0x80
jae 0x5e4184
movzx esi, dl
movzx edx, byte [esp + 0x2b]
shl esi, 7
add esi, edx
movzx ecx, cl
shl esi, 7
movzx edx, al
add esi, ecx
shl esi, 7
add esi, edx
push 1
mov eax, esi
cdq
push 0
push edx
push eax
mov eax, dword [edi]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov eax, dword [edi]
push 0
lea ecx, [esp + 0x18]
push ecx
push 4
lea edx, [esp + 0x18]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
sub dword [edi + 8], eax
cmp eax, 4
jne 0x5e422d
mov ecx, dword [esp + 0xc]
add esi, eax
add dword [ebx + 0x1c], esi
mov edx, ecx
or edx, 0xff000000
cmp edx, 0xff334449
je 0x5e40a6
jmp 0x5e4188
mov ecx, dword [esp + 0xc]
cmp cl, 0xff
jne 0x5e41f3
cmp ch, 0xe0
jb 0x5e41f3
movzx esi, ch
mov eax, esi
shr eax, 3
and eax, 3
mov eax, dword [eax*4 + 0x6bfa5c]
cmp eax, 4
mov dword [ebx], eax
jge 0x5e41f3
mov dl, ch
and dl, 6
cmp dl, 2
jne 0x5e41f3
xor edx, edx
mov eax, esi
and eax, 1
cmp dword [ebx], edx
mov dword [ebx + 4], eax
setne dl
mov dword [esp + 0x20], eax
movzx eax, byte [esp + 0xe]
mov esi, eax
shr esi, 4
shl edx, 4
add edx, esi
mov edx, dword [edx*4 + 0x6bfa70]
test edx, edx
mov dword [ebx + 8], edx
je 0x5e41f3
shr eax, 2
and eax, 3
cmp eax, 3
mov dword [ebx + 0xc], eax
jl 0x5e4237
mov edx, dword [edi]
push 0
shr ecx, 8
lea eax, [esp + 0x1c]
push eax
mov dword [esp + 0x14], ecx
push 1
lea ecx, [esp + 0x1b]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x18]
sub dword [edi + 8], eax
cmp eax, 1
jne 0x5e422d
add dword [ebx + 0x1c], eax
mov eax, dword [esp + 0x1c]
cmp dword [ebx + 0x1c], eax
jl 0x5e4090
xor al, al
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
movzx eax, byte [esp + 0xe]
shr eax, 1
and eax, 1
mov dword [ebx + 0x10], eax
movzx eax, byte [esp + 0xf]
mov ecx, eax
shr eax, 4
shr ecx, 6
and eax, 3
cmp dword [esp + 0x20], 0
mov dword [ebx + 0x14], ecx
mov dword [ebx + 0x18], eax
jne 0x5e427f
mov ecx, dword [edi]
push 0
lea edx, [esp + 0x24]
push edx
push 2
lea eax, [esp + 0x18]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [esp + 0x20]
sub dword [edi + 8], edx
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret 4