Function at 0x140013870
Capabilities:
Delete file
Print debug messages
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rdx
mov dword [rsp + 8], ecx
sub rsp, 0x68
mov dword [rsp + 0x40], 1
mov qword [rsp + 0x50], 0
mov dword [rsp + 0x48], 0
mov eax, dword [0x140023658]
mov dword [rsp + 0x5c], eax
cmp dword [rsp + 0x5c], 0
je 0x1400138d4
cmp dword [rsp + 0x5c], 4
je 0x14001396f
cmp dword [rsp + 0x5c], 5
je 0x140013933
cmp dword [rsp + 0x5c], 6
je 0x140013ad0
cmp dword [rsp + 0x5c], 7
je 0x140013b01
jmp 0x140013cca
movsxd rcx, dword [rsp + 0x70]
mov rax, qword [rsp + 0x78]
mov byte [rax + rcx], 0
mov dword [rsp + 0x58], 0
mov r9d, dword [rsp + 0x70]
add r9d, 1
mov qword [rsp + 0x38], 0
lea rax, [rsp + 0x58]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r8, qword [rsp + 0x78]
mov edx, 2
mov rcx, qword [0x140025270]
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
jmp 0x140013cca
movsxd rcx, dword [rsp + 0x70]
mov rax, qword [rsp + 0x78]
mov byte [rax + rcx], 0xd
mov eax, dword [rsp + 0x70]
add eax, 1
movsxd rcx, eax
mov rax, qword [rsp + 0x78]
mov byte [rax + rcx], 0xa
mov edx, dword [rsp + 0x70]
add edx, 2
mov rcx, qword [rsp + 0x78]
call fcn.140010d10
jmp 0x140013cca
cmp dword [0x140025280], 1
jne 0x140013acb
movsxd rcx, dword [rsp + 0x70]
mov rax, qword [rsp + 0x78]
mov byte [rax + rcx], 0xa
mov eax, dword [rsp + 0x70]
add eax, 1
movsxd rdx, eax
mov r9, qword [0x1400242e0]
mov r8d, 1
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.MSVCR90.dll_fwrite]
mov r8d, 2
xor edx, edx
mov rcx, qword [0x1400242e0]
call qword [sym.imp.MSVCR90.dll_fseek]
mov rcx, qword [0x1400242e0]
call qword [sym.imp.MSVCR90.dll_ftell]
mov dword [rsp + 0x44], eax
cmp dword [rsp + 0x44], 0
jl 0x140013acb
mov eax, dword [0x140020b58]
cmp dword [rsp + 0x44], eax
jle 0x140013abe
mov rcx, qword [0x1400242e0]
call qword [sym.imp.MSVCR90.dll_fclose]
mov eax, 3
sub eax, dword [0x140020b5c]
mov dword [0x140020b5c], eax
mov eax, dword [0x140020b5c]
mov dword [rsp + 0x20], eax
lea r9, str.C:TMPS7FILE
lea r8, str._s_d.TRC
mov edx, 0x100
lea rcx, [0x140024970]
call qword [sym.imp.MSVCR90.dll_sprintf_s]
lea r8, [0x1400211c4]
lea rdx, [0x140024970]
lea rcx, [0x1400242e0]
call qword [sym.imp.MSVCR90.dll_fopen_s]
test eax, eax
je 0x140013a56
jmp 0x140013abc
mov r8d, 2
xor edx, edx
mov rcx, qword [0x1400242e0]
call qword [sym.imp.MSVCR90.dll_fseek]
mov rcx, qword [0x1400242e0]
call qword [sym.imp.MSVCR90.dll_ftell]
mov dword [rsp + 0x44], eax
cmp dword [rsp + 0x44], 0
jl 0x140013abc
mov eax, dword [0x140020b58]
cmp dword [rsp + 0x44], eax
jle 0x140013aaf
mov rcx, qword [0x1400242e0]
call qword [sym.imp.MSVCR90.dll_fclose]
lea rcx, [0x140024970]
call qword [sym.imp.MSVCR90.dll_remove]
mov dword [rsp + 0x44], eax
jmp 0x140013abc
mov rcx, qword [0x1400242e0]
call qword [sym.imp.MSVCR90.dll_fclose]
jmp 0x140013acb
mov rcx, qword [0x1400242e0]
call qword [sym.imp.MSVCR90.dll_fclose]
jmp 0x140013cca
movsxd rcx, dword [rsp + 0x70]
mov rax, qword [rsp + 0x78]
mov byte [rax + rcx], 0xa
mov eax, dword [rsp + 0x70]
add eax, 1
movsxd rcx, eax
mov rax, qword [rsp + 0x78]
mov byte [rax + rcx], 0
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
jmp 0x140013cca
cmp dword [0x140020b6c], 0
je 0x140013cca
cmp dword [0x140025284], 0
jne 0x140013bd3
lea rax, [0x140025284]
mov qword [rsp + 0x28], rax
lea rax, [0x1400256b0]
mov qword [rsp + 0x20], rax
mov r9d, dword [0x1400252a8]
lea r8, [0x1400258b0]
lea rdx, [0x1400254b0]
lea rcx, [0x1400252b0]
call qword [0x140026170]
mov dword [rsp + 0x48], eax
cmp dword [rsp + 0x48], 0
je 0x140013bd3
mov dword [0x140025284], 0
cmp dword [0x140020b70], 0
je 0x140013bd3
movsxd r8, dword [rsp + 0x70]
mov rdx, qword [rsp + 0x78]
lea rcx, [0x1400234d0]
call sub.MSVCR90.dll_memcpy
movsxd r11, dword [rsp + 0x70]
lea rax, [0x1400234d0]
mov byte [rax + r11], 0
mov qword [rsp + 0x28], 0
lea rax, [0x1400234d0]
mov qword [rsp + 0x20], rax
lea r9, str.TraceOpenA
mov r8w, 2
mov edx, 0x80001402
mov cx, 1
call fcn.1400110d0
mov dword [0x140020b70], 0
cmp dword [0x140025284], 0
je 0x140013cca
mov r8d, 2
lea rdx, [0x1400211d4]
lea rcx, [0x1400234d0]
call sub.MSVCR90.dll_memcpy
lea rcx, [0x1400234d0]
add rcx, 2
mov r8d, 2
lea rdx, [rsp + 0x70]
call sub.MSVCR90.dll_memcpy
movsxd r8, dword [rsp + 0x70]
lea rcx, [0x1400234d0]
add rcx, 4
mov rdx, qword [rsp + 0x78]
call sub.MSVCR90.dll_memcpy
mov eax, dword [rsp + 0x70]
add eax, 4
mov dword [rsp + 0x20], eax
lea r9, [0x1400234d0]
mov r8d, dword [rsp + 0x40]
mov rdx, qword [rsp + 0x50]
mov ecx, dword [0x140025284]
call qword [0x140026160]
mov dword [rsp + 0x48], eax
cmp dword [rsp + 0x48], 0
je 0x140013cca
cmp dword [0x140020b70], 0
je 0x140013cca
movsxd r8, dword [rsp + 0x70]
mov rdx, qword [rsp + 0x78]
lea rcx, [0x1400234d0]
call sub.MSVCR90.dll_memcpy
movsxd r11, dword [rsp + 0x70]
lea rax, [0x1400234d0]
mov byte [rax + r11], 0
mov qword [rsp + 0x28], 0
lea rax, [0x1400234d0]
mov qword [rsp + 0x20], rax
lea r9, str.TraceWrite
mov r8w, 2
mov edx, 0x80001402
mov cx, 1
call fcn.1400110d0
mov dword [0x140020b70], 0
add rsp, 0x68
ret