Function at 0x10002dba4
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x5f0
mov rax, qword [0x1000355a0]
xor rax, rsp
mov qword [rsp + 0x5e0], rax
xor r14d, r14d
xor esi, esi
test r8d, r8d
mov r12d, r8d
mov r13, rdx
movsxd rbx, ecx
mov dword [rsp + 0x44], r14d
jne 0x10002dbec
xor eax, eax
jmp 0x10002e241
test rdx, rdx
jne 0x10002dc1f
call fcn.100023750
and dword [rax], esi
call fcn.100023728
and qword [rsp + 0x20], rsi
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov dword [rax], 0x16
call fcn.1000268dc
or eax, 0xffffffff
jmp 0x10002e241
mov r15b, bl
mov rbp, rbx
lea rcx, [0x100038b80]
sar rbp, 5
and r15d, 0x1f
mov rcx, qword [rcx + rbp*8]
mov qword [rsp + 0x58], rbp
imul r15, r15, 0x38
mov edi, dword [r15 + rcx + 0xc]
and edi, 3
cmp edi, 2
je 0x10002dc53
cmp edi, 1
jne 0x10002dc5c
mov eax, r12d
not eax
test al, 1
je 0x10002dbf1
test byte [r15 + rcx + 8], 0x20
je 0x10002dc71
xor edx, edx
mov ecx, ebx
lea r8d, [rdx + 2]
call fcn.10002d9a8
mov ecx, ebx
call fcn.10002ca38
test eax, eax
je 0x10002defd
lea rax, [0x100038b80]
mov rax, qword [rax + rbp*8]
test byte [r15 + rax + 8], 0x80
je 0x10002defd
call fcn.100026388
xor ebx, ebx
lea rdx, [rsp + 0x4c]
mov rcx, qword [rax + 0xc0]
lea rax, [0x100038b80]
cmp dword [rcx + 0x14], ebx
mov rcx, qword [rax + rbp*8]
mov rcx, qword [r15 + rcx]
sete bl
call qword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
je 0x10002defd
test ebx, ebx
je 0x10002dcd9
test edi, edi
je 0x10002defd
call qword [sym.imp.KERNEL32.dll_GetConsoleCP]
and dword [rsp + 0x50], esi
test r12d, r12d
mov ebp, eax
mov dword [rsp + 0x4c], eax
mov rbx, r13
je 0x10002def4
mov r14d, dword [rsp + 0x4c]
test edi, edi
jne 0x10002de71
movsx ecx, byte [rbx]
xor r14d, r14d
cmp byte [rbx], 0xa
sete r14b
call fcn.1000238c0
test eax, eax
jne 0x10002dd67
lea r8d, [rdi + 1]
lea rcx, [rsp + 0x40]
mov rdx, rbx
call fcn.10002cfcc
cmp eax, 0xffffffff
jne 0x10002dd92
mov ebx, dword [rsp + 0x4c]
mov r14d, dword [rsp + 0x44]
test esi, esi
jne 0x10002e23c
test ebx, ebx
je 0x10002e201
cmp ebx, 5
jne 0x10002e1f5
call fcn.100023728
mov dword [rax], 9
call fcn.100023750
mov dword [rax], ebx
jmp 0x10002dc17
mov rax, r12
sub rax, rbx
add rax, r13
cmp rax, 1
jle 0x10002dd2e
lea rcx, [rsp + 0x40]
mov r8d, 2
mov rdx, rbx
call fcn.10002cfcc
cmp eax, 0xffffffff
je 0x10002dd2e
add rbx, 1
and qword [rsp + 0x38], 0
and qword [rsp + 0x30], 0
lea rax, [rsp + 0x60]
lea r8, [rsp + 0x40]
mov r9d, 1
xor edx, edx
mov ecx, ebp
mov dword [rsp + 0x28], 5
add rbx, 1
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
mov ebp, eax
je 0x10002dd2e
mov rax, qword [rsp + 0x58]
and qword [rsp + 0x20], 0
lea rcx, [0x100038b80]
mov rcx, qword [rcx + rax*8]
lea r9, [rsp + 0x50]
lea rdx, [rsp + 0x60]
mov rcx, qword [r15 + rcx]
mov r8d, ebp
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10002dee7
add esi, dword [rsp + 0x50]
cmp dword [rsp + 0x50], ebp
jl 0x10002dd2e
test r14d, r14d
je 0x10002de6b
mov rax, qword [rsp + 0x58]
and qword [rsp + 0x20], 0
mov byte [rsp + 0x60], 0xd
lea rcx, [0x100038b80]
lea r9, [rsp + 0x50]
lea rdx, [rsp + 0x60]
mov rcx, qword [rcx + rax*8]
mov r8d, 1
mov rcx, qword [r15 + rcx]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10002dee7
cmp dword [rsp + 0x50], 1
jl 0x10002dd2e
add dword [rsp + 0x44], 1
add esi, 1
mov ebp, dword [rsp + 0x4c]
jmp 0x10002ded4
cmp edi, 1
je 0x10002de7b
cmp edi, 2
jne 0x10002de92
movzx eax, word [rbx]
xor r14d, r14d
cmp ax, 0xa
mov word [rsp + 0x40], ax
sete r14b
add rbx, 2
cmp edi, 1
je 0x10002de9c
cmp edi, 2
jne 0x10002ded4
movzx ecx, word [rsp + 0x40]
call fcn.10002ec8c
cmp ax, word [rsp + 0x40]
jne 0x10002dee7
add esi, 1
test r14d, r14d
je 0x10002ded4
mov cx, 0xd
mov word [rsp + 0x40], 0xd
call fcn.10002ec8c
cmp ax, word [rsp + 0x40]
jne 0x10002dee7
add esi, 1
add dword [rsp + 0x44], 1
mov eax, ebx
sub eax, r13d
cmp eax, r12d
jae 0x10002dd2e
jmp 0x10002dcfa
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x10002dd32
mov ebx, dword [rsp + 0x4c]
jmp 0x10002dd3f
lea rax, [0x100038b80]
mov rcx, qword [rax + rbp*8]
test byte [r15 + rcx + 8], 0x80
je 0x10002e1c8
xor ebx, ebx
test edi, edi
jne 0x10002dfd1
test r12d, r12d
mov rbp, r13
je 0x10002e208
lea rdi, [rsp + 0x70]
xor ecx, ecx
mov eax, ebp
sub eax, r13d
cmp eax, r12d
jae 0x10002df68
mov al, byte [rbp]
add rbp, 1
cmp al, 0xa
jne 0x10002df55
mov byte [rdi], 0xd
add r14d, 1
add rdi, 1
add rcx, 1
add rcx, 1
mov byte [rdi], al
add rdi, 1
cmp rcx, 0x400
jb 0x10002df31
and qword [rsp + 0x20], rbx
lea rax, [rsp + 0x70]
mov r8d, edi
sub r8d, eax
mov rax, qword [rsp + 0x58]
lea rcx, [0x100038b80]
mov rcx, qword [rcx + rax*8]
lea r9, [rsp + 0x48]
lea rdx, [rsp + 0x70]
mov rcx, qword [r15 + rcx]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10002e0a4
add esi, dword [rsp + 0x48]
lea rax, [rsp + 0x70]
sub rdi, rax
movsxd rax, dword [rsp + 0x48]
cmp rax, rdi
jl 0x10002dd37
mov eax, ebp
sub eax, r13d
cmp eax, r12d
jb 0x10002df2a
jmp 0x10002dd37
cmp edi, 2
jne 0x10002e0b1
test r12d, r12d
mov rbp, r13
je 0x10002e208
lea rdi, [rsp + 0x70]
xor ecx, ecx
mov eax, ebp
sub eax, r13d
cmp eax, r12d
jae 0x10002e039
movzx eax, word [rbp]
add rbp, 2
cmp ax, 0xa
jne 0x10002e01f
cmp rcx, 0x3fd
ja 0x10002e035
mov word [rdi], 0xd
add r14d, 2
add rdi, 2
add rcx, 2
add rcx, 2
mov word [rdi], ax
add rdi, 2
cmp rcx, 0x3ff
jae 0x10002e039
jmp 0x10002dfed
sub rbp, 2
and qword [rsp + 0x20], rbx
lea rax, [rsp + 0x70]
mov r8d, edi
sub r8d, eax
mov rax, qword [rsp + 0x58]
lea rcx, [0x100038b80]
mov rcx, qword [rcx + rax*8]
lea r9, [rsp + 0x48]
lea rdx, [rsp + 0x70]
mov rcx, qword [r15 + rcx]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10002e0a4
movsxd rcx, dword [rsp + 0x48]
lea rax, [rsp + 0x70]
sub rdi, rax
add esi, ecx
cmp rcx, rdi
jl 0x10002dd37
test ecx, ecx
je 0x10002dd37
mov eax, ebp
sub eax, r13d
cmp eax, r12d
jb 0x10002dfe6
jmp 0x10002dd37
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x10002dd37
test r12d, r12d
mov rdi, r13
je 0x10002e20d
lea rdx, [rsp + 0x480]
xor ecx, ecx
mov eax, edi
sub eax, r13d
cmp eax, r12d
jae 0x10002e10e
movzx eax, word [rdi]
add rdi, 2
cmp ax, 0xa
jne 0x10002e0f4
cmp rcx, 0x150
ja 0x10002e10a
mov word [rdx], 0xd
add rdx, 2
add rcx, 2
add rcx, 2
mov word [rdx], ax
add rdx, 2
cmp rcx, 0x152
jae 0x10002e10e
jmp 0x10002e0c7
sub rdi, 2
and qword [rsp + 0x38], 0
and qword [rsp + 0x30], 0
lea rax, [rsp + 0x480]
sub edx, eax
lea r8, [rsp + 0x480]
mov ecx, 0xfde9
mov eax, edx
mov dword [rsp + 0x28], 0x2ab
cdq
sub eax, edx
xor edx, edx
sar eax, 1
mov r9d, eax
lea rax, [rsp + 0x70]
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
mov r14d, eax
je 0x10002dee7
xor ebp, ebp
mov rax, qword [rsp + 0x58]
and qword [rsp + 0x20], 0
movsxd rcx, ebp
lea rdx, [rsp + rcx + 0x70]
mov r8d, r14d
lea rcx, [0x100038b80]
mov rcx, qword [rcx + rax*8]
lea r9, [rsp + 0x48]
sub r8d, ebp
mov rcx, qword [r15 + rcx]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10002e1a4
add ebp, dword [rsp + 0x48]
cmp r14d, ebp
jg 0x10002e162
jmp 0x10002e1ac
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
cmp r14d, ebp
jg 0x10002dd32
mov esi, edi
sub esi, r13d
cmp esi, r12d
jb 0x10002e0bd
jmp 0x10002dd32
mov rcx, qword [r15 + rcx]
and qword [rsp + 0x20], rsi
lea r9, [rsp + 0x48]
mov r8d, r12d
mov rdx, r13
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10002e0a4
mov esi, dword [rsp + 0x48]
xor ebx, ebx
jmp 0x10002dd37
mov ecx, ebx
call fcn.100023778
jmp 0x10002dc17
lea rax, [0x100038b80]
mov rbp, qword [rsp + 0x58]
mov rax, qword [rax + rbp*8]
test byte [r15 + rax + 8], 0x40
je 0x10002e224
cmp byte [r13], 0x1a
je 0x10002dbe5
call fcn.100023728
mov dword [rax], 0x1c
call fcn.100023750
and dword [rax], 0
jmp 0x10002dc17
sub esi, r14d
mov eax, esi
mov rcx, qword [rsp + 0x5e0]
xor rcx, rsp
call fcn.100023280
mov rbx, qword [rsp + 0x648]
add rsp, 0x5f0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret