Function at 0x14000aec0
Capabilities:
Write file on windows

Disassembly:
push rbp
push rsi
push r12
push r14
lea rbp, [rsp - 0x3f]
sub rsp, 0x98
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x17], rax
mov r14, rcx
mov eax, 0x20
xor r12d, r12d
mov ecx, 0x100
mov rsi, rdx
mov word [0x14003dfc0], ax
mov word [0x14003ee6c], r12w
call qword [sym.imp.MSVCR120.dll_malloc]
mov qword [0x14003ee70], rax
test rax, rax
jne 0x14000af1f
lea eax, [r12 - 3]
jmp 0x14000b6c1
mov qword [rsp + 0xd0], rbx
mov qword [rsp + 0x90], rdi
lea rcx, [0x140042940]
mov edx, 0x100
mov r8, r14
mov qword [rsp + 0x88], r13
mov qword [rsp + 0x80], r15
call fcn.14002a640
test ax, ax
jle 0x14000b69d
lea r15, [0x14003dfd0]
lea r13, [0x14003e050]
nop word [rax + rax]
mov rcx, qword [r14]
mov ebx, dword [0x14003e1a8]
mov r9d, 1
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edi, eax
inc eax
test eax, 0xfffffffe
jne 0x14000afca
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x58
jae 0x14000afae
mov ecx, eax
lea rax, [0x1400310a0]
mov edx, dword [rax + rcx*4]
jmp 0x14000afb3
mov edx, 0x106
mov dword [0x1400430b8], edx
mov dword [0x1400434c8], 2
mov byte [0x1400433c0], r12b
test ebx, ebx
je 0x14000afe1
imul eax, edi, 0x64
xor edx, edx
div ebx
mov r8d, eax
mov word [0x14003ee5c], ax
jmp 0x14000afe9
movzx r8d, word [0x14003ee5c]
movzx edx, word [0x14003ee44]
movzx r9d, r8w
mov ecx, r9d
sub ecx, edx
cmp ecx, 1
jl 0x14000b052
movzx ecx, word [0x14003ee60]
inc dx
mov eax, 0x51eb851f
mov word [0x14003ee44], dx
mov word [0x14003e1a4], r8w
imul ecx, r9d
imul ecx
mov ecx, edx
lea rdx, [0x14003e1b0]
sar ecx, 5
mov eax, ecx
shr eax, 0x1f
add ecx, eax
add cx, word [0x14003ee48]
mov word [0x14003ee50], cx
call qword [0x140041aa8]
test ax, ax
jne 0x14000b6db
cmp word [0x140042940], 0x1a
je 0x14000b680
mov rdx, r15
call fcn.14000b6f0
test ax, ax
js 0x14000b6e9
mov rcx, r15
mov word [0x14003e0d6], ax
call fcn.14000b880
test ax, ax
js 0x14000b6e9
mov word [0x14003e0d0], ax
mov dword [0x14003e0d2], 0x3fff
mov ecx, r12d
mov rax, r15
cmp byte [rax], r12b
jne 0x14000b0ab
cmp byte [rax + 1], r12b
je 0x14000b0b3
add rax, 2
inc ecx
jmp 0x14000b0a0
add cx, cx
mov edx, 0x8000
movsx rax, cx
cmp byte [rax + r15 - 2], 0x21
jne 0x14000b0df
cmp byte [rax + r15 - 1], r12b
jne 0x14000b0df
mov word [rax + r15 - 2], r12w
add cx, 0xfffe
or word [0x14003e0d0], dx
movsx rax, cx
cmp byte [rax + r15 - 2], 0x3f
jne 0x14000b108
cmp byte [rax + r15 - 1], r12b
jne 0x14000b108
mov word [rax + r15 - 2], r12w
mov eax, 0x4000
add cx, 0xfffe
or word [0x14003e0d2], ax
movsx rax, cx
cmp byte [rax + r15 - 2], 0x2e
jne 0x14000b12c
cmp byte [rax + r15 - 1], r12b
jne 0x14000b12c
mov word [rax + r15 - 2], r12w
add cx, 0xfffe
or word [0x14003e0d6], dx
movsx rdi, cx
mov rcx, r12
mov rbx, rdi
test edi, edi
jle 0x14000b14c
nop word [rax + rax]
not byte [rcx + r15]
inc rcx
cmp rcx, rbx
jl 0x14000b140
mov rcx, qword [rsi]
lea r9, [rbp - 0x21]
mov r8d, edi
mov rdx, r15
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x14000b19d
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x58
jae 0x14000b181
lea rcx, [0x1400310a0]
mov eax, eax
mov ecx, dword [rcx + rax*4]
jmp 0x14000b186
mov ecx, 0x106
mov dword [0x1400430b8], ecx
mov dword [0x1400434c8], 2
mov byte [0x1400433c0], r12b
mov rcx, r12
test edi, edi
jle 0x14000b1c4
nop dword [rax]
nop dword [rax + rax]
movzx eax, byte [rcx + r15]
inc rcx
not al
mov byte [rcx + r15 - 1], al
cmp rcx, rbx
jl 0x14000b1b0
cmp dword [rbp - 0x21], edi
jne 0x14000b6e2
lea rbx, [0x14003c02c]
mov rdx, r13
mov rcx, rbx
nop word [rax + rax]
movzx eax, byte [rcx]
test al, al
jne 0x14000b1ed
cmp byte [rcx + 1], r12b
je 0x14000b200
mov byte [rdx], al
movzx eax, byte [rcx + 1]
add rdx, 2
mov byte [rdx - 1], al
add rcx, 2
jmp 0x14000b1e0
movzx eax, byte [rcx]
mov byte [rdx], al
movzx eax, byte [rcx + 1]
lea rcx, [rbp - 9]
mov byte [rdx + 1], al
movzx r8d, word [0x14003e0d0]
lea rdx, [0x1400347c4]
call qword [sym.imp.MSVCR120.dll_sprintf]
movsxd r9, eax
cmp r12w, r9w
jge 0x14000b256
lea rdx, [rbp - 9]
lea rcx, [rbp - 0x18]
movzx r8d, r9w
nop word [rax + rax]
movzx eax, byte [rdx]
mov byte [rcx], r12b
lea rcx, [rcx + 2]
mov byte [rcx - 3], al
lea rdx, [rdx + 1]
dec r8
jne 0x14000b240
movsx rax, r9w
lea rdx, [rbp - 0x19]
mov rcx, r13
mov word [rbp + rax*2 - 0x19], r12w
cmp byte [rcx], r12b
jne 0x14000b272
cmp byte [rcx + 1], r12b
je 0x14000b278
add rcx, 2
jmp 0x14000b267
movzx eax, byte [rdx]
test al, al
jne 0x14000b285
cmp byte [rdx + 1], r12b
je 0x14000b298
mov byte [rcx], al
movzx eax, byte [rdx + 1]
add rcx, 2
mov byte [rcx - 1], al
add rdx, 2
jmp 0x14000b278
mov word [rcx], r12w
mov rdx, rbx
mov rcx, r13
cmp byte [rcx], r12b
jne 0x14000b2ad
cmp byte [rcx + 1], r12b
je 0x14000b2b3
add rcx, 2
jmp 0x14000b2a2
movzx eax, byte [rdx]
test al, al
jne 0x14000b2c0
cmp byte [rdx + 1], r12b
je 0x14000b2d3
mov byte [rcx], al
movzx eax, byte [rdx + 1]
add rcx, 2
mov byte [rcx - 1], al
add rdx, 2
jmp 0x14000b2b3
mov word [rcx], r12w
movzx r8d, word [0x14003e0d2]
lea rdx, [0x1400347c4]
lea rcx, [rbp + 0xf]
call qword [sym.imp.MSVCR120.dll_sprintf]
movsxd r9, eax
cmp r12w, r9w
jge 0x14000b326
lea rdx, [rbp + 0xf]
lea rcx, [rbp - 0x18]
movzx r8d, r9w
nop word [rax + rax]
movzx eax, byte [rdx]
mov byte [rcx], r12b
lea rcx, [rcx + 2]
mov byte [rcx - 3], al
lea rdx, [rdx + 1]
dec r8
jne 0x14000b310
movsx rax, r9w
lea rdx, [rbp - 0x19]
mov rcx, r13
mov word [rbp + rax*2 - 0x19], r12w
cmp byte [rcx], r12b
jne 0x14000b342
cmp byte [rcx + 1], r12b
je 0x14000b348
add rcx, 2
jmp 0x14000b337
movzx eax, byte [rdx]
test al, al
jne 0x14000b355
cmp byte [rdx + 1], r12b
je 0x14000b368
mov byte [rcx], al
movzx eax, byte [rdx + 1]
add rcx, 2
mov byte [rcx - 1], al
add rdx, 2
jmp 0x14000b348
mov word [rcx], r12w
mov rdx, rbx
mov rcx, r13
cmp byte [rcx], r12b
jne 0x14000b37d
cmp byte [rcx + 1], r12b
je 0x14000b383
add rcx, 2
jmp 0x14000b372
movzx eax, byte [rdx]
test al, al
jne 0x14000b390
cmp byte [rdx + 1], r12b
je 0x14000b3a3
mov byte [rcx], al
movzx eax, byte [rdx + 1]
add rcx, 2
mov byte [rcx - 1], al
add rdx, 2
jmp 0x14000b383
mov word [rcx], r12w
movzx r8d, word [0x14003e0d4]
lea rdx, [0x1400347c4]
lea rcx, [rbp + 7]
call qword [sym.imp.MSVCR120.dll_sprintf]
movsxd r9, eax
cmp r12w, r9w
jge 0x14000b3f6
lea rdx, [rbp + 7]
lea rcx, [rbp - 0x18]
movzx r8d, r9w
nop word [rax + rax]
movzx eax, byte [rdx]
mov byte [rcx], r12b
lea rcx, [rcx + 2]
mov byte [rcx - 3], al
lea rdx, [rdx + 1]
dec r8
jne 0x14000b3e0
movsx rax, r9w
lea rdx, [rbp - 0x19]
mov rcx, r13
mov word [rbp + rax*2 - 0x19], r12w
cmp byte [rcx], r12b
jne 0x14000b412
cmp byte [rcx + 1], r12b
je 0x14000b418
add rcx, 2
jmp 0x14000b407
movzx eax, byte [rdx]
test al, al
jne 0x14000b425
cmp byte [rdx + 1], r12b
je 0x14000b438
mov byte [rcx], al
movzx eax, byte [rdx + 1]
add rcx, 2
mov byte [rcx - 1], al
add rdx, 2
jmp 0x14000b418
mov word [rcx], r12w
mov rdx, rbx
mov rcx, r13
cmp byte [rcx], r12b
jne 0x14000b44d
cmp byte [rcx + 1], r12b
je 0x14000b453
add rcx, 2
jmp 0x14000b442
movzx eax, byte [rdx]
test al, al
jne 0x14000b460
cmp byte [rdx + 1], r12b
je 0x14000b473
mov byte [rcx], al
movzx eax, byte [rdx + 1]
add rcx, 2
mov byte [rcx - 1], al
add rdx, 2
jmp 0x14000b453
mov word [rcx], r12w
movzx r8d, word [0x14003e0d6]
lea rdx, [0x1400347c4]
lea rcx, [rbp - 1]
call qword [sym.imp.MSVCR120.dll_sprintf]
movsxd r9, eax
cmp r12w, r9w
jge 0x14000b4c6
lea rdx, [rbp - 1]
lea rcx, [rbp - 0x18]
movzx r8d, r9w
nop word [rax + rax]
movzx eax, byte [rdx]
mov byte [rcx], r12b
add rcx, 2
mov byte [rcx - 3], al
lea rdx, [rdx + 1]
dec r8
jne 0x14000b4b0
movsx rax, r9w
lea rdx, [rbp - 0x19]
mov word [rbp + rax*2 - 0x19], r12w
mov rax, r13
cmp byte [rax], r12b
jne 0x14000b4e2
cmp byte [rax + 1], r12b
je 0x14000b4e8
add rax, 2
jmp 0x14000b4d7
movzx ecx, byte [rdx]
test cl, cl
jne 0x14000b4f5
cmp byte [rdx + 1], r12b
je 0x14000b508
mov byte [rax], cl
movzx ecx, byte [rdx + 1]
add rax, 2
mov byte [rax - 1], cl
add rdx, 2
jmp 0x14000b4e8
mov word [rax], r12w
mov ecx, r12d
mov rax, r13
cmp byte [rax], r12b
jne 0x14000b51d
cmp byte [rax + 1], r12b
je 0x14000b525
add rax, 2
inc ecx
jmp 0x14000b512
add cx, cx
movsx rdi, cx
mov rcx, r12
mov rbx, rdi
test edi, edi
jle 0x14000b550
nop word [rax + rax]
not byte [rcx + r15 + 0x80]
inc rcx
cmp rcx, rbx
jl 0x14000b540
mov rcx, qword [rsi]
lea r9, [rbp - 0x29]
mov r8d, edi
mov rdx, r13
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x14000b5a1
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x58
jae 0x14000b585
lea rcx, [0x1400310a0]
mov eax, eax
mov ecx, dword [rcx + rax*4]
jmp 0x14000b58a
mov ecx, 0x106
mov dword [0x1400430b8], ecx
mov dword [0x1400434c8], 2
mov byte [0x1400433c0], r12b
mov rcx, r12
test edi, edi
jle 0x14000b5c0
nop dword [rax + rax]
not byte [rcx + r15 + 0x80]
inc rcx
cmp rcx, rbx
jl 0x14000b5b0
cmp dword [rbp - 0x29], edi
jne 0x14000b6e2
lea rdx, [0x14003c030]
mov ecx, r12d
mov rax, rdx
cmp byte [rax], r12b
jne 0x14000b5e1
cmp byte [rax + 1], r12b
je 0x14000b5e9
add rax, 2
inc ecx
jmp 0x14000b5d6
add cx, cx
movsx rdi, cx
mov rcx, r12
mov rbx, rdi
test edi, edi
jle 0x14000b60b
nop word [rax + rax]
not byte [rcx + rdx]
inc rcx
cmp rcx, rbx
jl 0x14000b600
mov rcx, qword [rsi]
lea r9, [rbp - 0x25]
mov r8d, edi
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x14000b659
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x58
jae 0x14000b63d
lea rcx, [0x1400310a0]
mov eax, eax
mov ecx, dword [rcx + rax*4]
jmp 0x14000b642
mov ecx, 0x106
mov dword [0x1400430b8], ecx
mov dword [0x1400434c8], 2
mov byte [0x1400433c0], r12b
mov rcx, r12
test edi, edi
jle 0x14000b67b
lea rdx, [0x14003c030]
nop word [rax + rax]
not byte [rcx + rdx]
inc rcx
cmp rcx, rbx
jl 0x14000b670
cmp dword [rbp - 0x25], edi
jne 0x14000b6e2
lea rcx, [0x140042940]
mov edx, 0x100
mov r8, r14
call fcn.14002a640
test ax, ax
jg 0x14000af70
movzx eax, r12w
mov r13, qword [rsp + 0x88]
mov rdi, qword [rsp + 0x90]
mov rbx, qword [rsp + 0xd0]
mov r15, qword [rsp + 0x80]
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.14002c960
add rsp, 0x98
pop r14
pop r12
pop rsi
pop rbp
ret
mov eax, 0xfffffffc
jmp 0x14000b6a1
mov eax, 0xfffffffe
jmp 0x14000b6a1
mov eax, 0xfffffffd
jmp 0x14000b6a1