Function at 0x553450
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.00552ac0
mov ebp, dword [esp + 0x94]
add esp, 4
mov al, byte [ebp + 1]
mov cx, word [ebp + 2]
cmp al, 0x10
mov byte [esp + 0x12], al
mov word [esp + 0x24], cx
je 0x5534fd
mov eax, dword [edi + 2]
lea edx, [esp + 0x28]
push edx
push eax
call fcn.00552e90
add esp, 8
test eax, eax
jne 0x5534cd
push edi
call fcn.00554180
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.00552ba0
mov ebx, eax
lea eax, [esp + 0x30]
movsx edx, bx
push edx
push eax
push ebp
push ebp
call fcn.00553110
add esp, 0x18
mov dword [esp + 0x20], 1
jmp 0x55350c
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 0x55361b
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 0x55357b
mov byte [esp + 0x4a], bl
cmp bx, 0x3a
mov ecx, 0x3a
jg 0x553589
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 0x5535d7
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x55373d
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 0x553617
mov ecx, dword [esp + 0x18]
sub ebx, 0x3a
add ecx, 0x3a
test bx, bx
mov dword [esp + 0x18], ecx
jg 0x553551
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 0x553794
mov esi, dword [esp + 0x8c]
lea eax, [esp + 0x30]
lea ecx, [esp + 0x1c]
push eax
mov eax, dword [esi + 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 0x553680
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x553745
mov ecx, dword [esp + 0x40]
push 0xffffffffffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x55378f
mov ecx, dword [esi + 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 0x55378f
movzx dx, byte [esp + 0x48]
xor eax, eax
mov ah, byte [esp + 0x47]
or eax, edx
cmp ax, 0x410
jae 0x55378f
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 + 0x13], 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 0x553644
mov esi, dword [esp + 0x14]
jmp 0x553798
or edi, 0xffffffff
jmp 0x5537ea
cmp byte [esp + 0x12], 0x15
jne 0x553788
mov eax, dword [esp + 0x24]
cmp ax, 2
je 0x55375c
cmp ax, 1
jne 0x553788
mov ecx, dword [esp + 0x40]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
mov dword [esp + 0x44], 0
call fcn.00552af0
push esi
call fcn.00554180
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x78
ret
mov edi, 0xf0000004
jmp 0x5537f1
or edi, 0xffffffff
jmp 0x5537f1
mov bl, byte [esp + 0x13]
mov eax, dword [esp + 0x20]
sub esi, 2
test eax, eax
je 0x5537d0
cmp si, 2
jle 0x5537d0
sub esi, 2
lea edx, [esp + 0x28]
movsx edi, si
lea eax, [ebp + 8]
push edi
push edx
push eax
push eax
call fcn.00553180
mov ax, word [edi + ebp + 8]
add esp, 0x10
mov word [ebp + 0x41a], ax
jmp 0x5537d7
mov word [ebp + 0x41a], si
xor ecx, ecx
mov ch, bl
mov cl, byte [esp + 0x13]
push ecx
call fcn.00552ce0
add esp, 4
mov edi, eax
mov esi, dword [esp + 0x8c]
mov edx, dword [esp + 0x40]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
mov dword [esp + 0x44], 0
call fcn.00552af0
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x78
ret