Function at 0x513bf0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffac
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x50], ebx
mov dword [ebp - 0x54], ebx
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov byte [ebp - 1], al
xor eax, eax
push ebp
push 0x513f1b
push dword fs:[eax]
mov dword fs:[eax], esp
and byte [ebp - 1], 0x7f
mov byte [ebp - 0x11], 0
xor eax, eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x38], 0x80000000
cmp byte [ebp + 0x10], 0
jne 0x513c41
cmp dword [ebp + 8], 0x200
je 0x513c48
or dword [ebp - 0x38], 0x40000000
cmp byte [ebp + 0xc], 0
je 0x513c5b
xor eax, eax
mov al, byte [ebp - 1]
call fcn.005a8144
mov byte [ebp - 1], al
mov eax, dword [ebp + 0x1c]
cmp dword [eax], 0xffffffff
jne 0x513d37
mov byte [0x7cdd1c], 0
cmp byte [ebp + 0x14], 0
je 0x513cb5
push 0
push 0x2a000000
push 3
push 0
push 0
mov eax, dword [ebp - 0x38]
push eax
lea edx, [ebp - 0x4c]
xor eax, eax
mov al, byte [ebp - 1]
call fcn.0040a83c
mov ecx, dword [ebp - 0x4c]
lea eax, [ebp - 0x48]
mov edx, 0x513f38
call fcn.00405594
mov eax, dword [ebp - 0x48]
call fcn.00405748
push eax
call sub.kernel32.dll_CreateFileA_1
mov dword [ebp - 0x24], eax
jmp 0x513cf4
push 0
push 0x30000000
push 3
push 0
push 3
mov eax, dword [ebp - 0x38]
push eax
lea edx, [ebp - 0x54]
xor eax, eax
mov al, byte [ebp - 1]
call fcn.0040a83c
mov ecx, dword [ebp - 0x54]
lea eax, [ebp - 0x50]
mov edx, 0x513f38
call fcn.00405594
mov eax, dword [ebp - 0x50]
call fcn.00405748
push eax
call sub.kernel32.dll_CreateFileA_1
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0xffffffff
jne 0x513d1f
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0x20
jne 0x513d14
inc dword [ebp - 0x30]
push 0x64
call sub.kernel32.dll_Sleep_1
jmp 0x513d29
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x10], eax
jmp 0x513f00
mov eax, dword [ebp + 0x1c]
mov edx, dword [ebp - 0x24]
mov dword [eax], edx
jmp 0x513d3f
mov eax, dword [ebp - 0x30]
cmp eax, dword [ebp + 0x18]
jl 0x513c6e
jmp 0x513d3f
mov eax, dword [ebp + 0x1c]
mov eax, dword [eax]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0xffffffff
je 0x513ef9
cmp dword [ebp + 8], 0x201
jl 0x513d81
cmp dword [ebp + 8], 0x210
jg 0x513d81
push dword [ebp + 0x24]
push dword [ebp + 0x20]
mov eax, dword [ebp - 8]
cdq
push edx
push eax
mov eax, dword [ebp + 8]
push eax
mov edx, dword [ebp - 0xc]
mov ecx, dword [ebp + 0x28]
mov eax, dword [ebp - 0x24]
call fcn.00513fd8
mov dword [ebp - 0x10], eax
jmp 0x513f00
mov eax, dword [ebp + 0x20]
mov edx, dword [ebp + 0x24]
shld edx, eax, 9
shl eax, 9
mov dword [ebp - 0x28], eax
mov eax, dword [ebp + 0x20]
mov edx, dword [ebp + 0x24]
shrd eax, edx, 0x17
shr edx, 0x17
mov dword [ebp - 0x2c], eax
push 0
lea eax, [ebp - 0x2c]
push eax
mov eax, dword [ebp - 0x28]
push eax
mov eax, dword [ebp - 0x24]
push eax
call sub.kernel32.dll_SetFilePointer_1
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0xffffffff
je 0x513ef0
mov eax, dword [ebp - 8]
shl eax, 9
mov dword [ebp - 0x18], eax
xor eax, eax
mov dword [ebp - 0x1c], eax
push 0
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x18]
push eax
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x24]
push eax
call sub.kernel32.dll_ReadFile_1
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x11], al
cmp byte [ebp - 0x11], 0
je 0x513dff
xor eax, eax
mov dword [ebp - 0x10], eax
jmp 0x513f00
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0x57
jne 0x513f00
xor eax, eax
push ebp
push 0x513e3e
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp + 0x28]
inc eax
add eax, 0x20
call fcn.00402808
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x40], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x513e68
xor eax, eax
push ebp
push 0x513edc
push dword fs:[eax]
mov dword fs:[eax], esp
jmp 0x513e7f
mov eax, dword [ebp - 0x40]
inc eax
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x40]
and eax, 0x1f
test eax, eax
jne 0x513e78
push 0
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x40]
push eax
mov eax, dword [ebp - 0x24]
push eax
call sub.kernel32.dll_ReadFile_1
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x11], al
cmp byte [ebp - 0x11], 0
je 0x513ec5
xor eax, eax
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp + 0x28]
inc ecx
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x40]
call fcn.00402a6c
jmp 0x513ed2
call sub.kernel32.dll_GetLastError_1
add eax, 0x186a0
mov dword [ebp - 0x10], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x513ee6
mov eax, dword [ebp - 0x3c]
call fcn.00402828
jmp 0x513f00
mov dword [ebp - 0x10], 0xfffffffe
jmp 0x513f00
mov dword [ebp - 0x10], 0xffffffff
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x513f22
lea eax, [ebp - 0x54]
mov edx, 4
call fcn.0040529c
ret