Function at 0x40854a
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov dword [ebp - 4], 0
mov dword [ebp - 8], 0
push 0x14
call fcn.004422bd
add esp, 4
mov dword [ebp - 0xc], eax
mov ebx, eax
mov edi, eax
xor eax, eax
mov ecx, 5
rep stosd dword es:[edi], eax
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 0
cmp dword [0x4e9bf4], 0xffffffff
jne 0x4085aa
mov eax, 0
jmp 0x4088ae
push 0x80000301
push 0
push 0x41
push 1
mov ebx, 0x1bc
call fcn.00443a80
add esp, 0x10
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
push eax
mov ebx, dword [ebp - 4]
test ebx, ebx
je 0x4085df
push ebx
call fcn.004422cf
add esp, 4
pop eax
mov dword [ebp - 4], eax
push 0x80000301
push 0
push dword [0x4e9bf4]
push 1
mov ebx, 0x168
call fcn.00443bd0
add esp, 0x10
mov dword [ebp - 0x1c], eax
push dword [ebp - 0x1c]
push str.HID_ReadData_
mov ecx, 2
call fcn.00402cde
add esp, 8
mov dword [ebp - 0x20], eax
mov ebx, dword [ebp - 0x1c]
test ebx, ebx
je 0x40862d
push ebx
call fcn.004422cf
add esp, 4
mov dword [ebp - 0x24], esp
push dword [ebp - 0x20]
push 1
push 1
push 0
xor eax, eax
call dword [sym.imp.KERNEL32.dll_CreateEventA]
nop
nop
cmp dword [ebp - 0x24], esp
je 0x408668
push 0xe3
push 0x4030dcd
push 6
call fcn.004422c3
add esp, 0xc
mov dword [ebp - 0x28], eax
mov ebx, dword [ebp - 0x20]
test ebx, ebx
je 0x40867b
push ebx
call fcn.004422cf
add esp, 4
mov eax, dword [ebp - 0x28]
mov dword [ebp - 8], eax
mov ebx, dword [ebp - 0xc]
add ebx, 0x10
mov dword [ebp - 0x1c], ebx
mov eax, dword [ebp - 8]
mov ebx, dword [ebp - 0x1c]
mov dword [ebx], eax
mov ebx, dword [ebp - 0xc]
add ebx, 8
mov dword [ebp - 0x1c], ebx
mov ebx, dword [ebp - 0x1c]
mov dword [ebx], 0
mov ebx, dword [ebp - 0xc]
add ebx, 0xc
mov dword [ebp - 0x1c], ebx
mov ebx, dword [ebp - 0x1c]
mov dword [ebx], 0
mov dword [ebp - 0x1c], esp
push dword [ebp - 8]
xor eax, eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
nop
nop
cmp dword [ebp - 0x1c], esp
je 0x4086e2
push 0x182
push 0x4030dcd
push 6
call fcn.004422c3
add esp, 0xc
mov dword [ebp - 0x1c], esp
push dword [ebp - 0xc]
mov eax, 0x41
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x20]
push eax
push 0x41
mov eax, dword [ebp - 4]
test eax, eax
je 0x408703
add eax, 8
push eax
push dword [0x4e9bf4]
xor eax, eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
nop
nop
cmp dword [ebp - 0x1c], esp
je 0x408730
push 0x1b5
push 0x4030dcd
push 6
call fcn.004422c3
add esp, 0xc
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
and eax, 1
xor eax, 1
test eax, eax
je 0x4087e5
mov dword [ebp - 0x1c], esp
push 0xa
push dword [ebp - 8]
xor eax, eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
nop
nop
cmp dword [ebp - 0x1c], esp
je 0x408775
push 0x236
push 0x4030dcd
push 6
call fcn.004422c3
add esp, 0xc
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], 1
cmp dword [ebp - 0x14], 0x80
je 0x40879d
cmp dword [ebp - 0x14], 0x102
je 0x40879d
xor eax, eax
jmp 0x4087a2
mov eax, 1
test eax, eax
je 0x4087e0
mov dword [ebp - 0x1c], esp
push dword [0x4e9bf4]
xor eax, eax
call dword [sym.imp.KERNEL32.dll_CancelIo]
nop
nop
cmp dword [ebp - 0x1c], esp
je 0x4087d9
push 0x2e3
push 0x4030dcd
push 6
call fcn.004422c3
add esp, 0xc
mov dword [ebp - 0x10], 0
jmp 0x40887a
mov ebx, dword [ebp - 4]
call fcn.00401bde
mov eax, 1
cmp eax, ecx
jl 0x40880d
push 0x343
push 0x4030dcd
push 1
call fcn.004422c3
add esp, 0xc
add ebx, eax
mov dword [ebp - 0x1c], ebx
mov ebx, dword [ebp - 0x1c]
mov al, byte [ebx]
and eax, 0xff
mov dword [ebp - 0x18], eax
push 0x80000301
push 0
push dword [ebp - 0x18]
push 0x80000301
push 0
push 3
push VariantClear
push 0
mov eax, dword [ebp - 4]
test eax, eax
jne 0x408848
mov eax, 0x4c7769
push eax
push 3
mov ebx, 0x1a8
call fcn.00444ae0
add esp, 0x28
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
push eax
mov ebx, dword [ebp + 8]
mov ebx, dword [ebx]
test ebx, ebx
je 0x408874
push ebx
call fcn.004422cf
add esp, 4
pop eax
mov ebx, dword [ebp + 8]
mov dword [ebx], eax
mov dword [ebp - 0x1c], esp
push dword [ebp - 8]
xor eax, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
nop
nop
cmp dword [ebp - 0x1c], esp
je 0x4088a6
push 0x3b0
push 0x4030dcd
push 6
call fcn.004422c3
add esp, 0xc
mov eax, dword [ebp - 0x10]
jmp 0x4088ae
push eax
mov ebx, dword [ebp - 4]
test ebx, ebx
je 0x4088bf
push ebx
call fcn.004422cf
add esp, 4
mov ebx, dword [ebp - 0xc]
push ebx
call fcn.004422cf
add esp, 4
pop eax
mov esp, ebp
pop ebp
ret 4