Function at 0x1002f210
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov dword [ebp - 0x48], ecx
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x2c], 2
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
mov eax, dword [ebp - 0x48]
cmp dword [eax], 0
jne 0x1002f25c
jmp 0x1002f448
mov ecx, dword [ebp - 0x48]
mov edx, dword [ecx + 4]
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x48]
mov ecx, dword [eax]
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 0x48]
mov eax, dword [edx + 4]
push eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push 0x14
push 0
lea ecx, [ebp - 0x14]
push ecx
call fcn.10041d70
add esp, 0xc
mov edx, dword [ebp - 0x48]
mov eax, dword [edx + 4]
mov dword [ebp - 4], eax
lea ecx, [ebp - 0x14]
push ecx
lea edx, [ebp - 0x3c]
push edx
push 4
lea eax, [ebp - 0x38]
push eax
mov ecx, dword [ebp - 0x48]
mov edx, dword [ecx]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x1002f2cd
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x1002f2cd
jmp 0x1002f448
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x1c]
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
je 0x1002f2f0
jmp 0x1002f448
push 0
lea ecx, [ebp - 0x3c]
push ecx
lea edx, [ebp - 0x14]
push edx
mov eax, dword [ebp - 0x48]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
je 0x1002f31b
cmp dword [ebp - 0x3c], 4
jne 0x1002f31b
cmp dword [ebp - 0x38], 0
jne 0x1002f325
jmp 0x1002f448
cmp dword [ebp - 0x38], 0x6400000
jbe 0x1002f338
jmp 0x1002f448
mov dword [ebp - 0x30], 0
mov edx, dword [ebp - 0x38]
add edx, 1
push edx
call fcn.1003609f
add esp, 4
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp - 0x48]
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push 0x14
push 0
lea eax, [ebp - 0x14]
push eax
call fcn.10041d70
add esp, 0xc
mov ecx, dword [ebp - 0x48]
mov edx, dword [ecx + 4]
mov dword [ebp - 4], edx
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x3c]
push ecx
mov edx, dword [ebp - 0x38]
sub edx, dword [ebp - 0x30]
push edx
mov eax, dword [ebp - 0x34]
add eax, dword [ebp - 0x30]
push eax
mov ecx, dword [ebp - 0x48]
mov edx, dword [ecx]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x1002f3bf
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x1002f3bf
jmp 0x1002f448
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x1c]
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
je 0x1002f3dc
jmp 0x1002f448
push 0
lea ecx, [ebp - 0x3c]
push ecx
lea edx, [ebp - 0x14]
push edx
mov eax, dword [ebp - 0x48]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
je 0x1002f401
cmp dword [ebp - 0x3c], 0
jne 0x1002f405
jmp 0x1002f448
mov edx, dword [ebp - 0x3c]
add edx, dword [ebp - 0x30]
cmp edx, dword [ebp - 0x38]
jne 0x1002f412
jmp 0x1002f428
mov eax, dword [ebp - 0x30]
add eax, dword [ebp - 0x3c]
mov dword [ebp - 0x30], eax
mov ecx, 1
test ecx, ecx
jne 0x1002f357
mov edx, dword [ebp - 0x34]
add edx, dword [ebp - 0x38]
mov byte [edx], 0
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x34]
mov dword [eax], ecx
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x38]
mov dword [edx], eax
mov dword [ebp - 0x20], 1
cmp dword [ebp - 0x20], 0
jne 0x1002f466
cmp dword [ebp - 0x34], 0
je 0x1002f466
mov ecx, dword [ebp - 0x34]
mov dword [ebp - 0x44], ecx
mov edx, dword [ebp - 0x44]
push edx
call fcn.1003609a
add esp, 4
mov eax, dword [ebp - 0x20]
mov esp, ebp
pop ebp
ret 8