Function at 0x5097e0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x154
mov eax, dword [0x601018]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
xor ebx, ebx
mov edi, ecx
xor esi, esi
mov dword [ebp - 0x150], edi
mov dword [ebp - 0x154], eax
mov dword [ebp - 0x148], 0x19
mov dword [ebp - 0x14c], esi
jmp 0x509820
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x154]
push ebx
lea ecx, [ebp - 0x144]
push ecx
mov ecx, dword [edi + 8]
push edx
push eax
push ecx
mov dword [ebp - 0x144], ebx
mov dword [edi + 0x10], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x509972
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi + 0x10], eax
cmp eax, 0x5aa
je 0x509870
cmp eax, 0x5ac
je 0x509870
cmp eax, 0x299
jne 0x509972
cmp esi, ebx
jne 0x509942
mov eax, 1
lea edx, [ebp - 0x138]
push 0x124fb
push str.ERROR__d:
lea esi, [ebp - 0x140]
mov dword [ebp - 0x140], edx
mov dword [ebp - 0x13c], 0x100
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], ebx
mov byte [ebp - 0x24], bl
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], 0x124fb
call fcn.00506600
add esp, 8
push str.begin_read_operation_delay
mov eax, esi
mov byte [ebp - 0x24], bl
call fcn.00506660
lea eax, [edi + 0x14]
cmp eax, ebx
je 0x5098e9
cmp byte [eax], bl
je 0x5098e9
push eax
push str.filename___s_
call fcn.00506600
add esp, 8
mov edi, dword [edi + 0x10]
lea ecx, [ebp - 0x140]
call fcn.005067d0
cmp dword [ebp - 0x30], ebx
je 0x50991c
mov eax, dword [ebp - 0x140]
mov ecx, dword [ebp - 0x38]
push eax
push ecx
push 0x5cb5f8
mov ecx, 0x610240
call fcn.00504670
add esp, 0xc
mov dword [ebp - 0x30], ebx
mov eax, dword [ebp - 0x140]
lea edx, [ebp - 0x138]
cmp eax, edx
je 0x509936
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
add esp, 4
mov esi, dword [ebp - 0x14c]
mov edi, dword [ebp - 0x150]
mov eax, dword [ebp - 0x148]
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 0x148]
add esi, eax
add eax, 0x19
mov dword [ebp - 0x14c], esi
mov dword [ebp - 0x148], eax
cmp esi, 0xdbba0
jl 0x509820
cmp esi, ebx
jle 0x509a38
mov eax, 1
lea ecx, [ebp - 0x138]
push 0x124fc
push str.ERROR__d:
lea esi, [ebp - 0x140]
mov dword [ebp - 0x140], ecx
mov dword [ebp - 0x13c], 0x100
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], ebx
mov byte [ebp - 0x24], bl
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], 0x124fc
call fcn.00506600
add esp, 8
push str.end_read_operation_delay
mov eax, esi
mov byte [ebp - 0x24], bl
call fcn.00506660
lea eax, [edi + 0x14]
cmp eax, ebx
je 0x5099eb
cmp byte [eax], bl
je 0x5099eb
push eax
push str.filename___s_
call fcn.00506600
add esp, 8
mov edi, dword [edi + 0x10]
lea ecx, [ebp - 0x140]
call fcn.005067d0
cmp dword [ebp - 0x30], ebx
je 0x509a1e
mov edx, dword [ebp - 0x140]
mov eax, dword [ebp - 0x38]
push edx
push eax
push 0x5cb5f8
mov ecx, 0x610240
call fcn.00504670
add esp, 0xc
mov dword [ebp - 0x30], ebx
mov eax, dword [ebp - 0x140]
lea ecx, [ebp - 0x138]
cmp eax, ecx
je 0x509a38
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
add esp, 4
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x144]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00596083
mov esp, ebp
pop ebp
ret 8