Function at 0x53f6f0
Capabilities:
Read file on windows
Write file on windows

Disassembly:
sub esp, 0x78
push ebx
push ebp
push esi
push edi
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x44]
xor esi, esi
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
mov edi, dword [esp + 0x8c]
xor eax, eax
mov dword [esp + 0x28], eax
push edi
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x30], eax
call fcn.0053eeb0
mov ebp, dword [esp + 0x94]
add esp, 4
mov al, byte [ebp + 1]
mov cx, word [ebp + 2]
cmp al, 0x10
mov byte [esp + 0x13], al
mov word [esp + 0x24], cx
je 0x53f79d
mov eax, dword [edi + 2]
lea edx, [esp + 0x28]
push edx
push eax
call fcn.0053f0e0
add esp, 8
test eax, eax
jne 0x53f76d
push edi
call fcn.00540440
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x78
ret
xor ecx, ecx
push 8
mov cx, word [ebp + 0x418]
push ecx
call fcn.0053ef10
mov ebx, eax
lea eax, [esp + 0x30]
movsx edx, bx
push edx
push eax
push ebp
push ebp
call fcn.0053f340
add esp, 0x18
mov dword [esp + 0x20], 1
jmp 0x53f7ac
mov bx, word [ebp + 0x418]
mov dword [esp + 0x20], 0
mov edx, dword [edi + 2]
mov ecx, ebx
sar ecx, 8
push edx
mov byte [esp + 0x49], cl
mov byte [esp + 0x4a], bl
call sub.HID.DLL_HidD_FlushQueue
xor eax, eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
push eax
push 1
push 1
push eax
mov dword [esp + 0x50], eax
call dword [sym.imp.KERNEL32.dll_CreateEventA]
test bx, bx
mov dword [esp + 0x40], eax
jle 0x53f8bb
mov eax, dword [esp + 0x18]
mov byte [esp + 0x44], 2
mov ecx, eax
mov byte [esp + 0x48], al
sar ecx, 8
cmp bx, 0x3a
mov byte [esp + 0x47], cl
mov byte [esp + 0x49], 0
mov byte [esp + 0x4a], 0x3a
jg 0x53f81b
mov byte [esp + 0x4a], bl
cmp bx, 0x3a
mov ecx, 0x3a
jg 0x53f829
movsx ecx, bx
movsx esi, ax
mov edx, ecx
add esi, ebp
lea edi, [esp + 0x4b]
lea eax, [esp + 0x30]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push eax
and ecx, 3
lea edx, [esp + 0x48]
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x90]
lea ecx, [esp + 0x20]
push ecx
push 0x41
mov eax, dword [esi + 2]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x53f877
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x53f9d9
mov ecx, dword [esp + 0x40]
push 0xffffffffffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [esi + 2]
lea edx, [esp + 0x1c]
push 0
lea eax, [esp + 0x34]
push edx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
cmp bx, 0x3a
jle 0x53f8b7
mov ecx, dword [esp + 0x18]
sub ebx, 0x3a
add ecx, 0x3a
test bx, bx
mov dword [esp + 0x18], ecx
jg 0x53f7f1
mov esi, dword [esp + 0x14]
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x44]
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
mov byte [esp + 0x46], 0x3a
mov edx, dword [esp + 0x45]
and edx, 0xff
shl edx, 8
or edx, 0x3a
jle 0x53f9ea
mov edi, dword [esp + 0x8c]
lea eax, [esp + 0x30]
lea ecx, [esp + 0x1c]
push eax
mov eax, dword [edi + 2]
push ecx
lea edx, [esp + 0x4c]
push 0x41
push edx
push eax
mov byte [esp + 0x58], 1
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x53f920
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x53f9de
mov ecx, dword [esp + 0x40]
push 0xffffffffffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x53f9e5
mov ecx, dword [edi + 2]
lea edx, [esp + 0x1c]
push 1
lea eax, [esp + 0x34]
push edx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x53f9e5
movzx dx, byte [esp + 0x48]
xor eax, eax
mov ah, byte [esp + 0x47]
or eax, edx
cmp ax, 0x410
jae 0x53f9e5
mov ecx, dword [esp + 0x4a]
lea esi, [esp + 0x4b]
movsx eax, ax
and ecx, 0xff
mov edx, ecx
lea edi, [eax + ebp + 8]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x4a]
mov edx, dword [esp + 0x45]
movzx cx, byte [esp + 0x4a]
and eax, 0xff
and edx, 0xff
shl edx, 8
mov bl, byte [esp + eax + 0x4a]
mov al, byte [esp + eax + 0x49]
mov byte [esp + 0x12], al
mov eax, dword [esp + 0x14]
add eax, ecx
mov ecx, dword [esp + 0x46]
mov dword [esp + 0x14], eax
and ecx, 0xff
movsx eax, ax
or edx, ecx
cmp eax, edx
jl 0x53f8e4
mov esi, dword [esp + 0x14]
jmp 0x53f9ee
or esi, 0xffffffff
jmp 0x53fa40
mov esi, 0xf0000004
jmp 0x53fa47
or esi, 0xffffffff
jmp 0x53fa47
mov bl, byte [esp + 0x13]
mov eax, dword [esp + 0x20]
sub esi, 2
test eax, eax
je 0x53fa26
cmp si, 2
jle 0x53fa26
sub esi, 2
lea ecx, [esp + 0x28]
movsx edi, si
lea eax, [ebp + 8]
push edi
push ecx
push eax
push eax
call fcn.0053f3b0
mov dx, word [edi + ebp + 8]
add esp, 0x10
mov word [ebp + 0x41a], dx
jmp 0x53fa2d
mov word [ebp + 0x41a], si
xor eax, eax
mov ah, bl
mov al, byte [esp + 0x12]
push eax
call fcn.0053ef30
add esp, 4
mov esi, eax
mov edi, dword [esp + 0x8c]
mov ecx, dword [esp + 0x40]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
mov dword [esp + 0x44], 0
call fcn.0053eee0
mov al, byte [esp + 0x17]
add esp, 4
cmp al, 0x15
jne 0x53fa96
mov eax, dword [esp + 0x24]
cmp ax, 2
je 0x53fa7b
cmp ax, 1
jne 0x53fa96
cmp esi, 0xf0000008
je 0x53fa96
push edi
call fcn.00540440
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x78
ret
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x78
ret