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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
mov dword [ebp - 0xc], ecx
mov byte [ebp - 5], dl
mov dword [ebp - 4], eax
mov byte [ebp - 0xf], 0xd1
movsx eax, byte [0x4c5664]
cmp eax, 0x30
jne 0x4128e1
push 0
push 0x4dec34
push 1
lea edx, [ebp - 0xf]
push edx
push dword [0x4dea64]
call sub.RT_USB.DLL_FT_W32_WriteFile_1
push 0
push 0x4dec34
push 1
lea ecx, [ebp - 0xd]
push ecx
push dword [0x4dea64]
call sub.RT_USB.DLL_FT_W32_ReadFile_1
jmp 0x412911
push 0
push 0x4dec34
push 1
lea eax, [ebp - 0xf]
push eax
push dword [0x4dea64]
call sub.kernel32.dll_WriteFile_1
push 0
push 0x4dec34
push 1
lea edx, [ebp - 0xd]
push edx
push dword [0x4dea64]
call sub.kernel32.dll_ReadFile_1
mov cl, byte [ebp - 0xf]
mov byte [ebp - 0xe], cl
add byte [ebp + 8], 4
movsx eax, byte [0x4c5664]
cmp eax, 0x30
jne 0x412959
push 0
push 0x4dec34
push 1
lea edx, [ebp + 8]
push edx
push dword [0x4dea64]
call sub.RT_USB.DLL_FT_W32_WriteFile_1
push 0
push 0x4dec34
push 1
lea ecx, [ebp - 0xd]
push ecx
push dword [0x4dea64]
call sub.RT_USB.DLL_FT_W32_ReadFile_1
jmp 0x412989
push 0
push 0x4dec34
push 1
lea eax, [ebp + 8]
push eax
push dword [0x4dea64]
call sub.kernel32.dll_WriteFile_1
push 0
push 0x4dec34
push 1
lea edx, [ebp - 0xd]
push edx
push dword [0x4dea64]
call sub.kernel32.dll_ReadFile_1
mov cl, byte [ebp + 8]
xor byte [ebp - 0xe], cl
movsx eax, byte [0x4c5664]
cmp eax, 0x30
jne 0x4129cd
push 0
push 0x4dec34
push 1
lea edx, [ebp - 5]
push edx
push dword [0x4dea64]
call sub.RT_USB.DLL_FT_W32_WriteFile_1
push 0
push 0x4dec34
push 1
lea ecx, [ebp - 0xd]
push ecx
push dword [0x4dea64]
call sub.RT_USB.DLL_FT_W32_ReadFile_1
jmp 0x4129fd
push 0
push 0x4dec34
push 1
lea eax, [ebp - 5]
push eax
push dword [0x4dea64]
call sub.kernel32.dll_WriteFile_1
push 0
push 0x4dec34
push 1
lea edx, [ebp - 0xd]
push edx
push dword [0x4dea64]
call sub.kernel32.dll_ReadFile_1
mov cl, byte [ebp - 5]
xor byte [ebp - 0xe], cl
mov byte [ebp - 0x10], 4
mov al, byte [ebp - 0x10]
cmp al, byte [ebp + 8]
jae 0x412a99
movsx edx, byte [0x4c5664]
cmp edx, 0x30
jne 0x412a50
push 0
push 0x4dec34
push 1
push dword [ebp - 0xc]
push dword [0x4dea64]
call sub.RT_USB.DLL_FT_W32_WriteFile_1
push 0
push 0x4dec34
push 1
lea ecx, [ebp - 0xd]
push ecx
push dword [0x4dea64]
call sub.RT_USB.DLL_FT_W32_ReadFile_1
jmp 0x412a7f
push 0
push 0x4dec34
push 1
push dword [ebp - 0xc]
push dword [0x4dea64]
call sub.kernel32.dll_WriteFile_1
push 0
push 0x4dec34
push 1
lea eax, [ebp - 0xd]
push eax
push dword [0x4dea64]
call sub.kernel32.dll_ReadFile_1
mov edx, dword [ebp - 0xc]
mov cl, byte [edx]
xor byte [ebp - 0xe], cl
inc dword [ebp - 0xc]
inc byte [ebp - 0x10]
mov al, byte [ebp - 0x10]
cmp al, byte [ebp + 8]
jb 0x412a13
movsx edx, byte [0x4c5664]
cmp edx, 0x30
jne 0x412ad7
push 0
push 0x4dec34
push 1
lea ecx, [ebp - 0xe]
push ecx
push dword [0x4dea64]
call sub.RT_USB.DLL_FT_W32_WriteFile_1
push 0
push 0x4dec34
push 1
lea eax, [ebp - 0xd]
push eax
push dword [0x4dea64]
call sub.RT_USB.DLL_FT_W32_ReadFile_1
jmp 0x412b07
push 0
push 0x4dec34
push 1
lea edx, [ebp - 0xe]
push edx
push dword [0x4dea64]
call sub.kernel32.dll_WriteFile_1
push 0
push 0x4dec34
push 1
lea ecx, [ebp - 0xd]
push ecx
push dword [0x4dea64]
call sub.kernel32.dll_ReadFile_1
xor eax, eax
mov esp, ebp
pop ebp
ret 4