Function at 0x500bf0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6bfb7d
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x78efc4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
cmp byte [esi + 0x54], 0
jne 0x500f41
mov al, byte [esi + 0x1a0]
nop
test al, al
jne 0x500f41
mov eax, dword [esi + 0x48]
dec eax
cmp eax, 9
ja case.default.0x500c40
jmp dword [eax*4 + 0x500f64]
cmp byte [esi + 0x54], 0
jne 0x500f51
mov eax, dword [esi + 0x40]
test eax, eax
je 0x500c66
push eax
call dword [sym.imp.KERNEL32.dll_UnregisterWait]
mov dword [esi + 0x40], 0
mov eax, dword [esi + 0x3c]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x500c7d
push eax
call edi
mov dword [esi + 0x3c], 0
mov eax, dword [esi + 0x68]
test eax, eax
je 0x500f51
push eax
call edi
mov dword [esi + 0x68], 0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.004ffbd0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0
push eax
lea eax, [esi + 0x58]
push eax
push dword [esi + 0x3c]
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
setne bl
test eax, eax
je 0x500ce2
xor eax, eax
jmp 0x500ce8
call dword [sym.imp.KERNEL32.dll_GetLastError]
test bl, bl
je 0x500cf5
mov dword [esi + 0x48], 4
jmp 0x500d07
cmp eax, 0x3e4
je 0x500f51
mov dword [esi + 0x48], 0xa
push dword [esi + 0x68]
call dword [sym.imp.KERNEL32.dll_SetEvent]
test eax, eax
jne 0x500f51
mov dword [esi + 0x48], 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0xf8
lea edi, [esi + 0x70]
mov dword [ebp - 0x10], 0
push 0
push edi
call fcn.00679eb0
add esp, 0xc
lea eax, [esi + 0x58]
push eax
lea eax, [ebp - 0x10]
push eax
push 0xf8
push edi
push dword [esi + 0x3c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
setne bl
test eax, eax
je 0x500d6f
xor eax, eax
jmp 0x500d75
call dword [sym.imp.KERNEL32.dll_GetLastError]
test bl, bl
jne 0x500d80
cmp eax, 0x3e5
jne 0x500d00
mov dword [esi + 0x48], 5
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0
push eax
lea eax, [esi + 0x58]
push eax
push dword [esi + 0x3c]
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x500d00
cmp dword [ebp - 0x10], 0xf8
jne 0x500d00
mov dword [esi + 0x48], 6
jmp 0x500d07
call fcn.004ffc40
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0
push eax
lea eax, [esi + 0x58]
push eax
push dword [esi + 0x3c]
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
mov ecx, dword [esi + 0x68]
push ecx
test eax, eax
je 0x500e19
mov dword [esi + 0x48], 8
jmp 0x500d0a
mov dword [esi + 0x48], 0xa
jmp 0x500d0a
lea eax, [esi + 0x58]
mov dword [ebp - 0x10], 0
push eax
lea eax, [ebp - 0x10]
push eax
push 0xf8
lea eax, [esi + 0x70]
push eax
push dword [esi + 0x3c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
setne bl
test eax, eax
je 0x500e53
xor eax, eax
jmp 0x500e59
call dword [sym.imp.KERNEL32.dll_GetLastError]
test bl, bl
je 0x500e69
mov dword [esi + 0x48], 9
jmp 0x500d07
cmp eax, 0x3e5
jne 0x500d00
mov dword [esi + 0x48], 9
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0
push eax
lea eax, [esi + 0x58]
push eax
push dword [esi + 0x3c]
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x500d00
push esi
mov dword [ebp - 0x18], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [ebp - 0x14], 1
mov dword [ebp - 4], 0
xor bl, bl
mov eax, dword [esi + 0x18]
mov ecx, dword [esi + 0x1c]
cmp eax, ecx
je 0x500ee5
mov edx, dword [esi + 0x168]
cmp edx, dword [eax]
je 0x500ee3
add eax, 4
cmp eax, ecx
jne 0x500ed6
jmp 0x500ee5
mov bl, 1
mov edi, dword [esi + 0x168]
test edi, edi
je 0x500f1e
test bl, bl
je 0x500f14
mov ecx, dword [esi + 0x16c]
lea eax, [edi + 0x1c8]
push eax
push dword [edi + 4]
push dword [edi + 0xc]
mov edx, dword [ecx]
push dword [edi + 8]
call dword [edx + 4]
mov edi, dword [esi + 0x168]
mov cl, 1
lea eax, [edi + 0x6e0]
xchg byte [eax], cl
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x500d00
call fcn.00500330
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push dword [esi + 0x68]
mov dword [esi + 0x48], 1
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret