Function at 0x505d90
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 0x10]
xor cl, cl
push ebx
push esi
cwde
xor ebx, ebx
add eax, 0x3e8
mov dword [ebp - 0x10], ebx
push edi
push eax
mov dword [ebp - 8], ebx
xor esi, esi
mov byte [ebp - 1], cl
call fcn.00593e38
mov edi, eax
add esp, 4
mov dword [ebp - 0xc], edi
test edi, edi
je 0x50602a
xor eax, eax
cmp ax, word [ebp + 0x14]
jge 0x506017
mov eax, dword [ebp + 8]
push dword [eax]
call fcn.00597fff
mov cl, al
add esp, 4
and al, 0x3f
test al, al
movzx ebx, al
mov eax, 0x40
cmove ebx, eax
movzx eax, cl
and eax, 0xc0
mov dword [ebp - 0x14], ebx
cmp eax, 0xc0
ja case.0x505e0e.1
movzx eax, byte [eax + 0x50604c]
jmp dword [eax*4 + 0x506038]
mov eax, dword [ebp + 8]
movzx ebx, bx
movzx edi, si
push dword [eax]
mov eax, dword [ebp - 0xc]
push 1
add eax, edi
push ebx
push eax
call fcn.00595b79
lea eax, [edi + ebx]
add esp, 0x10
mov edi, dword [ebp - 0xc]
add esi, dword [ebp - 0x14]
mov cl, byte [eax + edi - 1]
mov byte [ebp - 1], cl
jmp case.0x505e0e.1
mov eax, dword [ebp + 8]
push dword [eax]
call fcn.00597fff
mov cl, al
movzx eax, bx
push eax
movzx eax, cl
push eax
movzx eax, si
add eax, edi
mov byte [ebp - 1], cl
push eax
call fcn.00595760
add esp, 0x10
add esi, ebx
jmp case.0x505e0e.1
test bx, bx
je case.0x505e0e.1
jmp 0x505e80
mov eax, dword [ebp + 8]
push dword [eax]
call fcn.00597fff
mov dl, byte [ebp - 1]
mov ch, al
mov cl, ch
add esp, 4
and cl, 8
neg cl
sbb cl, cl
and al, 0xf
and cl, 0xf0
add ebx, 0xffff
or cl, al
movzx eax, si
add dl, cl
inc esi
mov byte [ebp - 1], dl
mov byte [eax + edi], dl
test bx, bx
je case.0x505e0e.1
shr ch, 4
mov al, ch
and al, 8
neg al
sbb al, al
and ch, 0xf
and al, 0xf0
add ebx, 0xffff
or al, ch
add dl, al
movzx eax, si
inc esi
mov byte [ebp - 1], dl
mov byte [eax + edi], dl
test bx, bx
jne 0x505e80
jmp case.0x505e0e.1
test bx, bx
je case.0x505e0e.1
mov eax, dword [ebp + 8]
push dword [eax]
call fcn.00597fff
mov dl, byte [ebp - 1]
mov ch, al
mov cl, ch
add esp, 4
and cl, 2
neg cl
sbb cl, cl
and al, 3
and cl, 0xfc
add ebx, 0xffff
or cl, al
movzx eax, si
add dl, cl
inc esi
mov byte [ebp - 1], dl
mov byte [eax + edi], dl
test bx, bx
je case.0x505e0e.1
shr ch, 2
mov cl, ch
mov al, ch
and cl, 2
neg cl
sbb cl, cl
and al, 3
and cl, 0xfc
add ebx, 0xffff
or cl, al
movzx eax, si
add dl, cl
inc esi
mov byte [ebp - 1], dl
mov byte [eax + edi], dl
test bx, bx
je case.0x505e0e.1
shr ch, 2
mov cl, ch
mov al, ch
and cl, 2
neg cl
sbb cl, cl
and al, 3
and cl, 0xfc
add ebx, 0xffff
or cl, al
movzx eax, si
add dl, cl
inc esi
mov byte [ebp - 1], dl
mov byte [eax + edi], dl
test bx, bx
je case.0x505e0e.1
shr ch, 2
mov al, ch
and al, 2
neg al
sbb al, al
and ch, 3
and al, 0xfc
add ebx, 0xffff
or al, ch
add dl, al
movzx eax, si
inc esi
mov byte [ebp - 1], dl
mov byte [eax + edi], dl
test bx, bx
jne 0x505ef4
mov edx, dword [ebp + 0x10]
movzx eax, si
movsx ecx, dx
cmp eax, ecx
jl 0x506006
inc dword [ebp - 8]
push ecx
push edi
push dword [ebp + 0xc]
call fcn.00592150
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 0x18]
call fcn.004585b0
movzx ebx, ax
add esp, 0x1c
mov dword [ebp - 0x10], ebx
test bx, bx
jne 0x506017
sub esi, dword [ebp + 0x10]
test si, si
je 0x506009
movzx eax, si
push eax
add eax, edi
push eax
push edi
call fcn.00592150
add esp, 0xc
jmp 0x506009
mov ebx, dword [ebp - 0x10]
mov ax, word [ebp + 0x14]
cmp word [ebp - 8], ax
jl 0x505dd3
push edi
call fcn.00592c4b
add esp, 4
mov ax, bx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret