Function at 0x50fd30
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0x14]
sub esp, 0x28
push ebx
push esi
lea eax, [ecx - 9]
xor esi, esi
push edi
cmp ax, 0xe
ja 0x50fd58
mov ebx, dword [ebp + 0x10]
mov dword [ebp - 8], 2
mov ecx, dword [ebx + 0x10]
add ecx, ecx
jmp 0x50fd81
mov dword [ebp - 8], 1
cmp cx, 8
jg 0x50fd6c
mov eax, 1
jmp 0x50fd78
movsx eax, cx
cdq
and edx, 7
add eax, edx
sar eax, 3
mov ebx, dword [ebp + 0x10]
mov ecx, dword [ebx + 0x10]
imul ecx, eax
lea eax, [ecx + 0x400]
mov dword [ebp - 0xc], ecx
push eax
push 1
mov dword [ebp - 0x20], eax
call fcn.00592c0b
mov edi, eax
add esp, 8
mov dword [ebp - 4], edi
test edi, edi
jne 0x50fdab
lea eax, [edi + 1]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ax, word [ebp + 0x18]
cmp ax, 8
jge 0x50fe0b
xor edi, edi
cmp dword [ebx + 0x14], esi
jle 0x50fdf5
movsx ebx, ax
nop
mov eax, dword [ebp + 8]
push dword [eax]
mov eax, dword [ebp + 0x10]
push 1
push ebx
push dword [eax + 0xc]
call fcn.00595b79
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 0x1c]
call fcn.004585b0
movzx esi, ax
add esp, 0x20
test si, si
jne 0x50fdf5
mov eax, dword [ebp + 0x10]
inc edi
cmp edi, dword [eax + 0x14]
jl 0x50fdc0
mov edi, dword [ebp - 4]
push edi
call fcn.00592c4b
add esp, 4
mov ax, si
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0x1c], esi
cmp dword [ebx + 0x14], esi
jle 0x50fdf8
mov edx, 0xfa
mov esi, dword [ebx + 0xc]
cmp ax, dx
jg 0x50fe33
cmp word [ebp + 0x14], 0x10
jg 0x50fe33
mov ebx, dword [ebp + 8]
push dword [ebx]
call fcn.00597fff
jmp 0x50fe3f
mov ebx, dword [ebp + 8]
push ebx
call fcn.0045d240
movzx eax, ax
add esp, 4
mov dword [ebp - 0x18], eax
cmp eax, dword [ebp - 0x20]
jg 0x50ffb6
push dword [ebx]
push 1
push eax
push edi
call fcn.00595b79
xor edx, edx
xor ebx, ebx
add esp, 0x10
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x10], ebx
cmp dword [ebp - 0x18], edx
jle 0x50ff4d
nop
mov al, byte [ebx + edi]
lea ecx, [ebx + edi]
test al, al
jns 0x50fed9
cmp al, 0x80
jne 0x50fe84
inc ebx
jmp 0x50ff41
movzx edi, al
not edi
and edi, 0xff
add edi, 2
mov dword [ebp - 0x28], edi
cmp edx, dword [ebp - 0xc]
jge 0x50fed1
test edi, edi
jle 0x50fed1
lea eax, [ecx + 1]
mov ebx, edi
mov dword [ebp - 0x24], eax
mov edi, eax
mov eax, dword [ebp - 8]
jmp 0x50feb0
push eax
push edi
push esi
call fcn.00592150
mov eax, dword [ebp - 8]
add esp, 0xc
add esi, eax
dec ebx
jne 0x50feb0
mov ebx, dword [ebp - 0x10]
mov edi, dword [ebp - 0x28]
inc ebx
mov edx, dword [ebp - 0x14]
add ebx, eax
jmp 0x50ff36
mov eax, dword [ebp - 8]
inc ebx
add ebx, eax
jmp 0x50ff36
movzx edi, al
inc edi
mov ecx, edi
imul ecx, dword [ebp - 8]
mov dword [ebp - 0x10], ecx
lea eax, [ecx + edx]
cmp eax, dword [ebp - 0xc]
jle 0x50ff17
mov eax, dword [ebp - 0xc]
cmp edx, eax
jge 0x50ff30
sub eax, ecx
sub eax, edx
mov dword [ebp - 0x28], eax
js 0x50ff4d
push eax
mov eax, dword [ebp - 4]
inc eax
add eax, ebx
push eax
push esi
call fcn.00592150
mov ecx, dword [ebp - 0x10]
add esp, 0xc
add esi, dword [ebp - 0x28]
jmp 0x50ff2d
mov eax, dword [ebp - 4]
inc eax
push ecx
add eax, ebx
push eax
push esi
call fcn.00592150
mov ecx, dword [ebp - 0x10]
add esp, 0xc
add esi, ecx
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 8]
inc ebx
add ebx, ecx
imul edi, eax
add edx, edi
mov edi, dword [ebp - 4]
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x10], ebx
cmp ebx, dword [ebp - 0x18]
jl 0x50fe70
cmp word [ebp + 0x14], 0x10
mov ebx, dword [ebp + 0x10]
jne 0x50ff78
mov edi, dword [ebx + 0xc]
xor esi, esi
cmp dword [ebx + 0x10], esi
jle 0x50ff78
movzx eax, word [edi + esi*2]
push eax
call fcn.0045c6f0
mov word [edi + esi*2], ax
add esp, 4
inc esi
cmp esi, dword [ebx + 0x10]
jl 0x50ff61
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 0x1c]
call fcn.004585b0
movzx esi, ax
add esp, 0x10
test si, si
jne 0x50fdf5
mov eax, dword [ebp - 0x1c]
mov edx, 0xfa
mov edi, dword [ebp - 4]
inc eax
cmp eax, dword [ebx + 0x14]
mov dword [ebp - 0x1c], eax
mov ax, word [ebp + 0x18]
jl 0x50fe18
jmp 0x50fdf5
push edi
call fcn.00592c4b
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret