Function at 0x509c80
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x180
mov eax, dword [0x641a90]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
push edi
push 0x1f40
mov dword [ebp - 0x180], ebx
call fcn.00593e38
mov edi, eax
add esp, 4
mov dword [ebp - 0x17c], edi
test edi, edi
jne 0x509ccf
lea eax, [edi + 1]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret
push dword [esi]
push 1
push 0x1f40
push edi
call fcn.00595b79
add esp, 0x10
test eax, eax
jne 0x509cfb
pop edi
pop esi
mov eax, 2
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x16c]
push eax
call fcn.00457d90
mov ax, word [0x5ee274]
movq xmm0, qword [str.Hires_Oric]
mov word [ebp - 0x7e], ax
mov al, byte [0x5ee276]
mov byte [ebp - 0x7c], al
lea eax, [ebp - 0x16c]
push eax
push ebx
movq qword [ebp - 0x86], xmm0
mov dword [ebp - 0x16c], 2
mov dword [ebp - 0x15c], 0xf0
mov dword [ebp - 0x158], 0xc8
mov dword [ebp - 0x154], 0x30001
mov dword [ebp - 0x14c], 0xf0
call fcn.00456000
movzx esi, ax
add esp, 0xc
test si, si
jne 0x509edb
cmp dword [ebp - 0x158], 0
mov dword [ebp - 0x174], 0
jle 0x509ec0
mov edi, edi
xor cl, cl
mov bh, 7
xor eax, eax
mov byte [ebp - 0x16e], cl
mov byte [ebp - 0x16d], bh
lea esi, [eax + 0x28]
movzx edx, byte [edi]
mov bl, cl
mov dword [ebp - 0x178], edx
inc edi
and edx, 0x7f
cmp edx, 8
jge 0x509dc7
mov ch, dl
xor edx, edx
mov byte [ebp - 0x16d], ch
mov bh, ch
jmp 0x509dee
lea ecx, [edx - 6]
cmp ecx, 0x11
mov ch, byte [ebp - 0x16d]
ja 0x509de8
mov cl, dl
mov bh, ch
sub cl, 0x10
xor edx, edx
mov byte [ebp - 0x16e], cl
mov bl, cl
jmp 0x509dee
mov cl, byte [ebp - 0x16e]
test byte [ebp - 0x178], 0x80
je 0x509dff
mov bl, 7
mov bh, 7
sub bl, cl
sub bh, ch
mov ecx, dword [ebp - 0x160]
test dl, 0x20
je 0x509e0f
mov byte [ecx + eax], bh
jmp 0x509e12
mov byte [ecx + eax], bl
mov ecx, dword [ebp - 0x160]
inc eax
test dl, 0x10
je 0x509e23
mov byte [ecx + eax], bh
jmp 0x509e26
mov byte [ecx + eax], bl
mov ecx, dword [ebp - 0x160]
inc eax
test dl, 8
je 0x509e37
mov byte [ecx + eax], bh
jmp 0x509e3a
mov byte [ecx + eax], bl
mov ecx, dword [ebp - 0x160]
inc eax
test dl, 4
je 0x509e4b
mov byte [ecx + eax], bh
jmp 0x509e4e
mov byte [ecx + eax], bl
mov ecx, dword [ebp - 0x160]
inc eax
test dl, 2
je 0x509e5f
mov byte [ecx + eax], bh
jmp 0x509e62
mov byte [ecx + eax], bl
mov ecx, dword [ebp - 0x160]
inc eax
test dl, 1
je 0x509e73
mov byte [ecx + eax], bh
jmp 0x509e76
mov byte [ecx + eax], bl
mov cl, byte [ebp - 0x16e]
inc eax
mov bh, byte [ebp - 0x16d]
dec esi
jne 0x509da5
mov ebx, dword [ebp - 0x180]
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push ebx
call fcn.004585b0
movzx esi, ax
add esp, 0x10
test si, si
jne 0x509ec0
mov edx, dword [ebp - 0x174]
inc edx
mov dword [ebp - 0x174], edx
cmp edx, dword [ebp - 0x158]
jl 0x509d90
push 0x63ae84
push 8
push 0x100
push ebx
call fcn.00453f80
mov edi, dword [ebp - 0x17c]
add esp, 0x10
push edi
call fcn.00592c4b
mov ecx, dword [ebp - 4]
add esp, 4
mov ax, si
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.005920c1
mov esp, ebp
pop ebp
ret