Function at 0x18003b140
Capabilities:
Write file on windows

Disassembly:
push rbp
push rsi
push rdi
sub rsp, 0x3b0
mov rax, qword [0x18005b0d0]
xor rax, rsp
mov qword [rsp + 0x3a0], rax
cmp dword [rcx + 8], 0xffffffff
mov rbp, r8
mov esi, edx
mov rdi, rcx
je 0x18003b173
mov rcx, qword [rcx]
call fcn.18003a860
mov rcx, qword [rdi]
mov dword [rdi + 8], 0xffffffff
cmp esi, dword [rcx + 8]
jl 0x18003b18c
mov eax, 0x10000
jmp 0x18003b463
mov qword [rsp + 0x3e8], r12
cmp esi, dword [rcx + 0x14]
jge 0x18003b19e
call fcn.180039fa0
mov rax, qword [rdi]
xor r12d, r12d
mov qword [rsp + 0x3d8], rbx
cmp dword [rax + 0x14], esi
jge 0x18003b207
mov rbx, qword [rdi]
test rbx, rbx
je 0x18003b1ff
cmp dword [rbx + 0x1c], r12d
je 0x18003b1ff
mov edx, dword [rbx + 0x14]
inc edx
cmp edx, dword [rbx + 8]
je 0x18003b1ff
mov ecx, dword [rbx + 0x54]
mov eax, dword [rbx + 0x4c]
mov dword [rbx + 0x14], edx
add ecx, dword [rbx + 0x50]
lea r8, [rbx + 0x7c]
lea rdx, [rbx + 0x2c]
lea ecx, [rcx + rax + 0x2e]
xor r9d, r9d
mov dword [rsp + 0x20], r12d
add dword [rbx + 0x18], ecx
mov rcx, rbx
call fcn.180039b30
mov ecx, r12d
test eax, eax
sete cl
mov dword [rbx + 0x1c], ecx
mov rax, qword [rdi]
cmp dword [rax + 0x14], esi
jl 0x18003b1b1
cmp esi, 0xffffffff
jl 0x18003b21b
lea r8, [rsp + 0x50]
mov edx, esi
mov rcx, rdi
call fcn.18003a9d0
mov eax, dword [rsp + 0x158]
shr eax, 4
test al, 1
movzx eax, byte [rbp]
je 0x18003b266
cmp al, 0x2f
je 0x18003b255
cmp al, 0x5c
je 0x18003b255
test al, al
je 0x18003b23f
cmp byte [rbp + 1], 0x3a
je 0x18003b255
lea rcx, [rdi + 0x150]
mov rdx, rbp
call fcn.18003afc0
xor eax, eax
jmp 0x18003b453
xor ecx, ecx
mov rdx, rbp
call fcn.18003afc0
xor eax, eax
jmp 0x18003b453
mov byte [rsp + 0x290], r12b
mov rsi, rbp
mov rcx, rbp
test al, al
je 0x18003b28f
cmp al, 0x2f
je 0x18003b280
cmp al, 0x5c
jne 0x18003b284
lea rsi, [rcx + 1]
movzx eax, byte [rcx + 1]
inc rcx
test al, al
jne 0x18003b278
lea rcx, [rsp + 0x180]
mov r8d, 0x104
mov rdx, rbp
call qword [sym.imp.MSVCR100.dll__mbsnbcpy]
cmp rsi, rbp
jne 0x18003b2b5
mov byte [rsp + 0x180], r12b
jmp 0x18003b2e1
mov rax, rsi
sub rax, rbp
mov byte [rsp + rax + 0x180], r12b
movzx eax, byte [rsp + 0x180]
cmp al, 0x2f
je 0x18003b313
cmp al, 0x5c
je 0x18003b313
test al, al
je 0x18003b2e1
cmp byte [rsp + 0x181], 0x3a
je 0x18003b313
lea r9, [rsp + 0x180]
lea r8, [rdi + 0x150]
lea rdx, str._s_s_s
lea rcx, [rsp + 0x290]
mov qword [rsp + 0x20], rsi
call qword [sym.imp.MSVCR100.dll_sprintf]
lea rcx, [rdi + 0x150]
jmp 0x18003b335
lea r8, [rsp + 0x180]
lea rdx, str._s_s
lea rcx, [rsp + 0x290]
mov r9, rsi
call qword [sym.imp.MSVCR100.dll_sprintf]
xor ecx, ecx
lea rdx, [rsp + 0x180]
call fcn.18003afc0
mov eax, dword [rsp + 0x158]
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], eax
lea rcx, [rsp + 0x290]
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
mov dword [rsp + 0x20], 2
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x18003b386
mov eax, 0x200
jmp 0x18003b453
mov rdx, qword [rdi + 0x140]
mov rcx, qword [rdi]
call fcn.18003a2c0
cmp qword [rdi + 0x148], r12
jne 0x18003b3b0
mov ecx, 0x4000
call qword [sym.imp.MSVCR100.dll_void____ptr64___cdecl_operator_new___unsigned_long_long_unsigned___int64__]
mov qword [rdi + 0x148], rax
mov rdx, qword [rdi + 0x148]
mov rcx, qword [rdi]
lea r9, [rsp + 0x40]
mov r8d, 0x4000
call fcn.18003a4e0
mov ebx, eax
cmp eax, 0xffffff96
je 0x18003b413
test eax, eax
js 0x18003b403
jle 0x18003b3f8
mov rdx, qword [rdi + 0x148]
lea r9, [rsp + 0x44]
mov r8d, eax
mov rcx, rsi
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x18003b40b
cmp byte [rsp + 0x40], r12b
jne 0x18003b419
test ebx, ebx
jne 0x18003b3b0
mov r12d, 0x5000000
jmp 0x18003b419
mov r12d, 0x400
jmp 0x18003b419
mov r12d, 0x1000
mov rcx, qword [rdi]
call fcn.18003a860
test r12d, r12d
jne 0x18003b447
lea r9, [rsp + 0x16c]
lea r8, [rsp + 0x15c]
lea rdx, [rsp + 0x164]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetFileTime]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, r12d
mov rbx, qword [rsp + 0x3d8]
mov r12, qword [rsp + 0x3e8]
mov rcx, qword [rsp + 0x3a0]
xor rcx, rsp
call fcn.18003c580
add rsp, 0x3b0
pop rdi
pop rsi
pop rbp
ret