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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff78
mov dword [ebp - 0x2c], eax
mov eax, 0x4cce6c
call fcn.004b9cc0
mov byte [ebp - 0x31], 0
movsx edx, byte [0x4c5664]
cmp edx, 0x30
jne 0x412491
cmp byte [0x4dea47], 0x10
je 0x41246c
cmp byte [0x4dea47], 0x20
jne 0x412478
mov dl, 0x25
mov eax, dword [ebp - 0x2c]
call fcn.0041224c
jmp 0x412482
mov dl, 0x17
mov eax, dword [ebp - 0x2c]
call fcn.0041224c
push 0xc
push dword [0x4dea64]
call sub.RT_USB.DLL_FT_W32_PurgeComm_1
jmp 0x4124c6
cmp byte [0x4dea47], 0x10
je 0x4124a3
cmp byte [0x4dea47], 0x20
jne 0x4124af
mov dl, 0x25
mov eax, dword [ebp - 0x2c]
call fcn.004122e4
jmp 0x4124b9
mov dl, 0x17
mov eax, dword [ebp - 0x2c]
call fcn.004122e4
push 0xc
push dword [0x4dea64]
call sub.kernel32.dll_PurgeComm_1
mov byte [ebp - 0x32], 0
movsx ecx, byte [0x4c5664]
cmp ecx, 0x30
jne 0x4124f0
push 0
push 0x4dec34
push 1
lea eax, [ebp - 0x30]
push eax
push dword [0x4dea64]
call sub.RT_USB.DLL_FT_W32_ReadFile_1
jmp 0x412508
push 0
push 0x4dec34
push 1
lea edx, [ebp - 0x30]
push edx
push dword [0x4dea64]
call sub.kernel32.dll_ReadFile_1
cmp dword [0x4dec34], 0
jne 0x41251a
inc byte [ebp - 0x32]
cmp byte [ebp - 0x32], 5
jb 0x4124ca
cmp dword [0x4dec34], 0
jne 0x412534
mov al, 2
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x41288b
cmp byte [ebp - 0x30], 0x55
je 0x41259b
cmp byte [ebp - 0x30], 0xb5
je 0x412546
cmp byte [ebp - 0x30], 0xa5
jne 0x41258a
mov dword [0x4dec1c], 0x2580
mov dword [0x4dec00], 0x2580
movsx ecx, byte [0x4c5664]
cmp ecx, 0x30
jne 0x412578
push 0x4debfc
push dword [0x4dea64]
call sub.RT_USB.DLL_FT_W32_SetCommState_1
jmp 0x41259b
push 0x4dec18
push dword [0x4dea64]
call sub.kernel32.dll_SetCommState_1
jmp 0x41259b
mov al, 0xb
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x41288b
mov byte [ebp - 0x33], 0
movsx ecx, byte [0x4c5664]
cmp ecx, 0x30
jne 0x4125c5
push 0
push 0x4dec34
push 1
lea eax, [ebp - 0x30]
push eax
push dword [0x4dea64]
call sub.RT_USB.DLL_FT_W32_ReadFile_1
jmp 0x4125dd
push 0
push 0x4dec34
push 1
lea edx, [ebp - 0x30]
push edx
push dword [0x4dea64]
call sub.kernel32.dll_ReadFile_1
cmp dword [0x4dec34], 0
je 0x4125ec
cmp byte [ebp - 0x30], 1
je 0x4125f5
inc byte [ebp - 0x33]
cmp byte [ebp - 0x33], 3
jb 0x41259f
cmp dword [0x4dec34], 0
je 0x412604
cmp byte [ebp - 0x30], 1
je 0x412615
mov al, 0xc
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x41288b
mov byte [ebp - 0x34], 0
movsx ecx, byte [0x4c5664]
cmp ecx, 0x30
jne 0x41263f
push 0
push 0x4dec34
push 1
lea eax, [ebp - 0x30]
push eax
push dword [0x4dea64]
call sub.RT_USB.DLL_FT_W32_ReadFile_1
jmp 0x412657
push 0
push 0x4dec34
push 1
lea edx, [ebp - 0x30]
push edx
push dword [0x4dea64]
call sub.kernel32.dll_ReadFile_1
cmp dword [0x4dec34], 0
je 0x412666
cmp byte [ebp - 0x30], 0x8a
je 0x41266f
inc byte [ebp - 0x34]
cmp byte [ebp - 0x34], 2
jb 0x412619
cmp dword [0x4dec34], 0
je 0x41267e
cmp byte [ebp - 0x30], 0x8a
je 0x41268f
mov al, 0xc
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x41288b
mov cl, 0xff
sub cl, byte [ebp - 0x30]
mov byte [ebp - 0x30], cl
push 0x14
call sub.kernel32.dll_Sleep_1
movsx eax, byte [0x4c5664]
cmp eax, 0x30
jne 0x4126dc
push 0
push 0x4dec34
push 1
lea edx, [ebp - 0x30]
push edx
push dword [0x4dea64]
call sub.RT_USB.DLL_FT_W32_WriteFile_1
push 0
push 0x4dec34
push 1
lea ecx, [ebp - 0x30]
push ecx
push dword [0x4dea64]
call sub.RT_USB.DLL_FT_W32_ReadFile_1
jmp 0x41270c
push 0
push 0x4dec34
push 1
lea eax, [ebp - 0x30]
push eax
push dword [0x4dea64]
call sub.kernel32.dll_WriteFile_1
push 0
push 0x4dec34
push 1
lea edx, [ebp - 0x30]
push edx
push dword [0x4dea64]
call sub.kernel32.dll_ReadFile_1
cmp dword [0x4dec34], 0
jne 0x412726
mov al, 1
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x41288b
mov eax, dword [ebp - 0x2c]
call fcn.004133b0
test eax, eax
je 0x412743
mov al, 3
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x41288b
and byte [0x4dead7], 0x7f
mov byte [ebp - 0x35], 2
jmp 0x41276d
xor ecx, ecx
mov cl, byte [ebp - 0x35]
mov al, byte [ecx + 0x4dead5]
xor edx, edx
mov dl, byte [ebp - 0x31]
mov byte [ebp + edx - 0x88], al
inc byte [ebp - 0x31]
inc byte [ebp - 0x35]
xor ecx, ecx
mov cl, byte [ebp - 0x35]
xor eax, eax
mov al, byte [0x4dead6]
add eax, 2
cmp ecx, eax
jl 0x412750
cmp byte [0x4dead5], 9
jne 0x41285b
push 0x23
lea edx, [ebp - 0x88]
push edx
push 0x4dea6a
call fcn.004b9880
add esp, 0xc
xor ecx, ecx
mov cl, byte [ebp - 0x64]
mov word [ebp - 0x38], cx
shl word [ebp - 0x38], 8
xor eax, eax
mov al, byte [ebp - 0x63]
or word [ebp - 0x38], ax
shr word [ebp - 0x38], 1
movzx edx, word [ebp - 0x38]
push edx
push 0x4cc4ec
push 0x4dea8e
call fcn.004bb6d8
add esp, 0xc
mov byte [0x4dea93], 0x20
xor ecx, ecx
mov cl, byte [ebp - 0x62]
mov word [ebp - 0x38], cx
shl word [ebp - 0x38], 8
xor eax, eax
mov al, byte [ebp - 0x61]
or word [ebp - 0x38], ax
movzx edx, word [ebp - 0x38]
push edx
push 0x4cc4f1
push 0x4dea94
call fcn.004bb6d8
add esp, 0xc
mov byte [0x4dea99], 0x20
xor ecx, ecx
mov cl, byte [ebp - 0x31]
mov byte [ebp + ecx - 0x88], 0
mov word [ebp - 0x18], 8
lea edx, [ebp - 0x88]
lea eax, [ebp - 4]
call fcn.004c3c68
inc dword [ebp - 0xc]
mov edx, dword [eax]
mov eax, dword [sym.Project1.exe__Form3]
mov ecx, dword [eax]
mov eax, dword [ecx + 0x2d4]
call fcn.0048e39c
dec dword [ebp - 0xc]
lea eax, [ebp - 4]
mov edx, 2
call fcn.004c3e54
jmp 0x41287f
push 0
xor ecx, ecx
mov dl, 9
mov eax, dword [ebp - 0x2c]
call fcn.00412b10
test eax, eax
je 0x412726
mov al, 4
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x41288b
xor eax, eax
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
mov esp, ebp
pop ebp
ret