Function at 0x503496
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, 0x566143
call fcn.0052b4a7
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 0x5034fa
cmp ecx, ebx
je 0x5034ec
mov byte [ecx], 1
mov ecx, edi
call fcn.00402286
mov eax, edi
jmp 0x5036f5
push ebx
lea ecx, [ebp]
mov dword [ebp + 0x18], 0xf
call fcn.00403320
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.0052b710
push 0x14
lea eax, [ebp - 0x4c]
push ebx
push eax
mov dword [ebp - 0x1c], ebx
call fcn.0052b710
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 0x5036a9
cmp dword [ebp - 0x10], 0xe9
je 0x5036ba
cmp dword [ebp - 0x10], 0x3e5
je 0x50359f
cmp dword [ebp - 0x28], ebx
jne 0x5035d1
cmp dword [ebp - 0x10], 0xea
jne 0x5035d1
cmp dword [ebp - 0x14], ebx
jne 0x5035d6
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 0x503718
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 0x503609
push dword [ebp - 0x14]
lea eax, [ebp + 0x1c]
push eax
lea ecx, [ebp - 0x88]
call fcn.00408842
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [ebp]
mov byte [ebp - 4], 2
call fcn.00405e12
push ebx
push edi
lea ecx, [ebp - 0x88]
mov byte [ebp - 4], 1
call fcn.00402cff
cmp dword [ebp - 0x1c], ebx
jne 0x503671
cmp dword [ebp + 0x14], 4
jb 0x503671
push 4
push ebx
lea ecx, [ebp]
call fcn.00407504
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.0052c940
add esp, 0xc
push 4
lea eax, [ebp - 0x64]
push eax
lea eax, [ebp - 0x6c]
push eax
lea ecx, [ebp]
call fcn.0040a1c4
mov ecx, eax
call fcn.00429d4e
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.0040a1c4
push dword [ebp - 0x50]
lea ecx, [ebp]
push edi
push dword [eax + 4]
push dword [eax]
lea eax, [ebp - 0x2c]
push eax
call fcn.0040d751
xor edi, edi
inc edi
cmp dword [ebp - 0x10], 0xea
jne 0x5036c4
mov eax, dword [ebp - 0x1c]
cmp eax, ebx
je 0x503686
cmp dword [ebp + 0x14], eax
jae 0x5036c4
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 0x503576
mov eax, dword [ebp - 0x24]
cmp eax, ebx
je 0x5036c4
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.004022f1
push ebx
push edi
lea ecx, [ebp]
mov dword [ebp - 0x30], edi
mov byte [ebp - 4], bl
call fcn.00402cff
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.0052b498
add ebp, 0x220
leave
ret
mov eax, dword [ebp - 0x24]
cmp eax, ebx
je 0x503722
mov byte [eax], 1
lea ecx, [ebp]
call fcn.0040d864
jmp 0x5036c4