Function at 0x50383f
Capabilities:
Read file on windows

Disassembly:
push ebp
sub esp, 0x21c
lea ebp, [esp - 4]
mov eax, dword [0x5c4954]
xor eax, ebp
mov dword [ebp + 0x21c], eax
push 0x7c
mov eax, 0x565f56
call fcn.0052b327
mov eax, dword [ebp + 0x22c]
mov edi, dword [ebp + 0x228]
mov ecx, dword [ebp + 0x238]
mov esi, dword [ebp + 0x230]
xor ebx, ebx
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x30], ebx
cmp eax, 0xffffffff
jne 0x5038a3
cmp ecx, ebx
je 0x503895
mov byte [ecx], 1
mov ecx, edi
call fcn.00402291
mov eax, edi
jmp 0x503a9e
push ebx
lea ecx, [ebp]
mov dword [ebp + 0x18], 0xf
call fcn.00403335
push 0x1ff
xor edi, edi
lea eax, [ebp + 0x1d]
push ebx
inc edi
push eax
mov dword [ebp - 4], edi
mov dword [ebp - 0x14], ebx
mov byte [ebp + 0x1c], bl
call fcn.0052b590
push 0x14
lea eax, [ebp - 0x4c]
push ebx
push eax
mov dword [ebp - 0x1c], ebx
call fcn.0052b590
add esp, 0x18
push ebx
push ebx
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_CreateEventA]
push eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], esi
call dword [sym.imp.KERNEL32.dll_ResetEvent]
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x14]
push eax
push 0x200
lea eax, [ebp + 0x1c]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x503a52
cmp dword [ebp - 0x10], 0xe9
je 0x503a63
cmp dword [ebp - 0x10], 0x3e5
je 0x503948
cmp dword [ebp - 0x28], ebx
jne 0x50397a
cmp dword [ebp - 0x10], 0xea
jne 0x50397a
cmp dword [ebp - 0x14], ebx
jne 0x50397f
push dword [ebp + 0x234]
lea eax, [ebp - 0x38]
push ebx
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
cmp eax, ebx
jne 0x503ac1
push ebx
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x4c]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
call esi
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x14], ebx
je 0x5039b2
push dword [ebp - 0x14]
lea eax, [ebp + 0x1c]
push eax
lea ecx, [ebp - 0x88]
call fcn.00408876
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [ebp]
mov byte [ebp - 4], 2
call fcn.00405e8f
push ebx
push edi
lea ecx, [ebp - 0x88]
mov byte [ebp - 4], 1
call fcn.00402d14
cmp dword [ebp - 0x1c], ebx
jne 0x503a1a
cmp dword [ebp + 0x14], 4
jb 0x503a1a
push 4
push ebx
lea ecx, [ebp]
call fcn.00407518
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.0052c7c0
add esp, 0xc
push 4
lea eax, [ebp - 0x64]
push eax
lea eax, [ebp - 0x6c]
push eax
lea ecx, [ebp]
call fcn.0040a20a
mov ecx, eax
call fcn.0042a52e
mov edi, dword [eax]
mov eax, dword [eax + 4]
mov dword [ebp - 0x50], eax
lea eax, [ebp - 0x5c]
push eax
lea ecx, [ebp]
call fcn.0040a20a
push dword [ebp - 0x50]
lea ecx, [ebp]
push edi
push dword [eax + 4]
push dword [eax]
lea eax, [ebp - 0x2c]
push eax
call fcn.0040dcae
xor edi, edi
inc edi
cmp dword [ebp - 0x10], 0xea
jne 0x503a6d
mov eax, dword [ebp - 0x1c]
cmp eax, ebx
je 0x503a2f
cmp dword [ebp + 0x14], eax
jae 0x503a6d
push dword [ebp - 0x3c]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x14]
push eax
push 0x200
lea eax, [ebp + 0x1c]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 0x28], eax
call esi
mov dword [ebp - 0x10], eax
cmp eax, 6
jne 0x50391f
mov eax, dword [ebp - 0x24]
cmp eax, ebx
je 0x503a6d
mov byte [eax], 1
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CancelIo]
push dword [ebp - 0x3c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x20]
lea eax, [ebp]
push eax
call fcn.004022fc
push ebx
push edi
lea ecx, [ebp]
mov dword [ebp - 0x30], edi
mov byte [ebp - 4], bl
call fcn.00402d14
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x21c]
xor ecx, ebp
call fcn.0052b318
add ebp, 0x220
leave
ret
mov eax, dword [ebp - 0x24]
cmp eax, ebx
je 0x503acb
mov byte [eax], 1
lea ecx, [ebp]
call fcn.0040ddc1
jmp 0x503a6d