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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x4c
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push 1
lea edx, [esp + 0x2c]
push edx
xor ecx, ecx
xor eax, eax
push ecx
push eax
mov eax, dword [ebx + 0x6b]
lea edi, [ebx + 0x6b]
push eax
xor esi, esi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x5e5909
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], esi
jmp 0x5e5919
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], edx
lea esi, [ebx + 0x97]
push esi
call fcn.005e4020
test al, al
jne 0x5e5934
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp dword [ebx + 0xb3], 0
jle 0x5e594d
lea eax, [ebx + 0x204f]
push eax
call fcn.005e3d50
test al, al
jne 0x5e5929
mov eax, dword [ebx + 0xb3]
add eax, dword [esp + 0x20]
mov ecx, dword [ebx + 0x9f]
mov dword [esp + 0x10], eax
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
mov word [ebx + 0x4f], cx
mov byte [ebx + 0x4e], 0
cmp dword [esi], 0
jne 0x5e5994
mov edx, dword [esi + 0x14]
sub edx, 3
neg edx
sbb edx, edx
and edx, 0xf
add edx, 0x11
movzx eax, dx
jmp 0x5e59a7
xor eax, eax
cmp dword [esi + 0x14], 3
setne al
lea eax, [eax*8 + 9]
movzx eax, ax
mov ecx, dword [ebx + 0x9b]
neg ecx
sbb ecx, ecx
and ecx, 0xfffffffe
movsx esi, ax
push 0
add ecx, 2
lea edx, [esp + 0x20]
push edx
sub esi, ecx
mov ecx, dword [edi]
push esi
lea eax, [esp + 0x44]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [esp + 0x1c]
sub dword [edi + 8], edx
xor eax, eax
test esi, esi
mov byte [esp + 0xf], 0
jbe 0x5e59f9
cmp byte [esp + eax + 0x38], 0
jne 0x5e59f4
add eax, 1
cmp eax, esi
jb 0x5e59e4
jmp 0x5e59f9
mov byte [esp + 0xf], 1
push 1
lea edx, [esp + 0x2c]
push edx
xor ecx, ecx
xor eax, eax
push ecx
push eax
mov eax, dword [edi]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x5e5a19
mov dword [esp + 0x34], eax
jmp 0x5e5a25
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x28]
mov dword [esp + 0x34], ecx
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea edx, [esp + 0x20]
push edx
mov dword [ebx + 0x93], eax
mov ecx, dword [edi]
push 4
lea eax, [esp + 0x24]
push eax
push ecx
mov dword [esp + 0x2c], 0
call esi
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
sub dword [edi + 8], edx
cmp eax, 0x676e6958
jne 0x5e5ba5
mov edx, dword [edi]
xor eax, eax
push eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
lea eax, [esp + 0x20]
push eax
push 8
lea ecx, [esp + 0x2c]
push ecx
push edx
call esi
mov eax, dword [esp + 0x1c]
sub dword [edi + 8], eax
test dword [esp + 0x20], 0x1000000
je 0x5e5b97
mov eax, dword [esp + 0x24]
mov edx, dword [edi]
lea ecx, [esp + 0x28]
bswap eax
push ecx
push edx
mov dword [esp + 0x2c], eax
mov dword [ebx + 0x1e], eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x5e5aba
xor esi, esi
mov dword [esp + 0x34], esi
jmp 0x5e5ac6
mov eax, dword [esp + 0x2c]
mov esi, dword [esp + 0x28]
mov dword [esp + 0x34], eax
push edi
call fcn.00496ff0
mov ecx, dword [ebx + 0xa3]
sub esi, eax
mov eax, dword [ecx*4 + 0x6bfaf0]
mov ecx, dword [ebx + 0x97]
mov edx, esi
mov esi, dword [ebx + 0x97]
neg esi
sbb esi, esi
sar eax, cl
mov dword [esp + 0x14], edx
and esi, 0xfffffdc0
add esi, 0x480
mov ecx, eax
mov eax, 0x74d3b7bb
mul edx
mov eax, dword [esp + 0x14]
sub eax, edx
shr eax, 1
add eax, edx
shr eax, 0xf
imul eax, ecx
cdq
idiv esi
cmp dword [ebx + 0x1e], eax
jl 0x5e5c4a
mov ecx, dword [ebx + 0xa3]
mov eax, dword [ecx*4 + 0x6bfaf0]
mov ecx, dword [ebx + 0x97]
sar eax, cl
mov dword [esp + 0x1c], eax
mov eax, 0x10624dd3
mul dword [esp + 0x14]
mov eax, dword [esp + 0x1c]
shr edx, 6
imul eax, edx
cdq
idiv esi
cmp dword [ebx + 0x1e], eax
jg 0x5e5c4a
lea esi, [ebx + 0x97]
mov byte [ebx + 0x4c], 1
mov byte [ebx + 0x4d], 1
call fcn.005d4ad0
movsx eax, ax
push edi
lea esi, [eax - 0xc]
call fcn.00496ff0
add eax, esi
push edi
mov dword [ebx + 0x77], eax
call fcn.00496ff0
add eax, 0x6c
push ebx
mov dword [ebx + 0x7f], eax
call fcn.005e5e80
jmp 0x5e5e4b
push edi
call fcn.00496ff0
add eax, 0x6c
jmp 0x5e5c41
cmp eax, 0x49524256
jne 0x5e5c31
push 1
xor ecx, ecx
push ecx
push ecx
mov ecx, dword [edi]
mov eax, 0xa
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov ecx, dword [edi]
push 0
lea edx, [esp + 0x20]
push edx
push 4
lea eax, [esp + 0x1c]
push eax
push ecx
mov dword [esp + 0x24], 0
call esi
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x1c]
sub dword [edi + 8], edx
bswap eax
lea esi, [ebx + 0x97]
mov dword [esp + 0x10], eax
mov dword [ebx + 0x1e], eax
mov byte [ebx + 0x4c], 1
mov byte [ebx + 0x4d], 1
call fcn.005d4ad0
movsx eax, ax
push 1
sub eax, 0x12
cdq
push 0
push edx
push eax
mov eax, dword [edi]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push edi
call fcn.00496ff0
mov dword [ebx + 0x77], eax
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp eax, 0x6f666e49
jne 0x5e5c4a
push edi
call fcn.00496ff0
add eax, 0x74
push ebx
mov dword [ebx + 0x7f], eax
call fcn.005e5e80
lea esi, [ebx + 0x97]
call fcn.005d4ad0
mov ecx, dword [edi]
movsx esi, ax
add esi, dword [ebx + 0x93]
xor eax, eax
push eax
push eax
push eax
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov edx, dword [edi + 0x10]
sub edx, esi
xor esi, esi
cmp byte [esp + 0xf], 0
mov dword [edi + 8], edx
je 0x5e5c93
mov eax, dword [esp + 0x10]
mov dword [ebx + 0x77], eax
mov dword [esp + 0x14], esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x10], esi
jmp 0x5e5ce2
push 1
lea edx, [esp + 0x2c]
push edx
xor ecx, ecx
xor eax, eax
push ecx
push eax
mov eax, dword [edi]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x5e5cc2
mov dword [esp + 0x34], esi
mov dword [ebx + 0x77], eax
mov dword [esp + 0x14], esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x10], esi
jmp 0x5e5ce2
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x34], ecx
mov dword [ebx + 0x77], eax
mov dword [esp + 0x14], esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x10], esi
jmp 0x5e5ce2
xor esi, esi
push 1
lea edx, [esp + 0x34]
push edx
xor eax, eax
push eax
push eax
mov eax, dword [edi]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x5e5d04
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], esi
jmp 0x5e5d14
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x34]
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], edx
lea esi, [ebx + 0x97]
push esi
call fcn.005e4020
test al, al
je 0x5e5db5
mov ecx, dword [esi]
mov edx, dword [esi + 0xc]
mov edx, dword [edx*4 + 0x6bfaf0]
mov eax, ecx
neg eax
sbb eax, eax
and eax, 0xffffffb8
add eax, 0x90
imul eax, dword [esi + 8]
sar edx, cl
mov ecx, edx
cdq
idiv ecx
add ax, word [esi + 0x10]
movsx esi, ax
add esi, dword [ebx + 0xb3]
xor eax, eax
add esi, dword [esp + 0x28]
push eax
push eax
push eax
mov eax, dword [edi]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov ecx, dword [edi + 0x10]
sub ecx, esi
mov dword [edi + 8], ecx
mov eax, dword [ebx + 0x9f]
mov ecx, dword [esp + 0x10]
add dword [esp + 0x14], eax
cmp ecx, 4
jl 0x5e5d92
cmp eax, dword [esp + 0x1c]
je 0x5e5d92
mov byte [ebx + 0x4c], 1
cmp dword [ebx + 0xa7], 1
jne 0x5e5d9f
mov byte [ebx + 0x4e], 1
add ecx, 1
cmp ecx, 0x32
mov dword [esp + 0x1c], eax
mov dword [esp + 0x10], ecx
jl 0x5e5ce0
jmp 0x5e5dc0
cmp dword [esp + 0x10], 0
je 0x5e5929
cmp byte [ebx + 0x4c], 0
je 0x5e5e4b
mov eax, dword [esp + 0x14]
cdq
idiv dword [esp + 0x10]
cmp dword [ebx + 0x97], 0
mov byte [ebx + 0x4e], 0
mov dword [esp + 0x20], eax
mov dword [ebx + 0x9f], eax
jne 0x5e5df2
fld qword [0x723c90]
jmp 0x5e5df8
fld qword [0x723c88]
mov edx, dword [ebx + 0xa3]
fimul dword [esp + 0x20]
mov eax, dword [edx*4 + 0x6bfaf0]
mov ecx, dword [ebx + 0x97]
sar eax, cl
mov dword [esp + 0x20], eax
fild dword [esp + 0x20]
fdivp st(1)
fst qword [ebx + 0x43]
fldz
fucomp st(1)
fnstsw ax
test ah, 0x44
jp 0x5e5e33
fstp st(0)
fld qword [0x7237d8]
jmp 0x5e5e43
mov ecx, dword [edi + 0x10]
sub ecx, dword [edi + 0xc]
mov dword [esp + 0x20], ecx
fild dword [esp + 0x20]
fdivrp st(1)
call fcn.006b24a0
mov dword [ebx + 0x1e], eax
mov ebx, dword [ebx + 0x77]
mov edx, dword [edi]
push 0
push 0
xor eax, eax
push eax
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov eax, dword [edi + 0x10]
sub eax, ebx
mov dword [edi + 8], eax
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret 4