Function at 0x140061ed0
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1ffd8]
mov eax, 0x200d8
call fcn.1400e19f0
sub rsp, rax
mov r14, r8
mov rsi, rdx
mov rdi, rcx
lea r12, vtable.TextStream.0
mov qword [rsp + 0x40], r12
xor r15d, r15d
mov qword [rsp + 0x48], r15
mov dword [rsp + 0x50], r15d
mov dword [rsp + 0x54], 0xffffffff
xorps xmm0, xmm0
movdqa xmmword [rsp + 0x70], xmm0
mov ecx, dword [0x1401323a0]
cmp ecx, 0xffffffff
je 0x140061f5b
mov dword [rsp + 0x54], ecx
lea rdx, [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_GetCPInfo]
test eax, eax
jne 0x140061f5b
mov byte [rsp + 0x5e], r15b
lea rax, vtable.TextFile.0
mov qword [rsp + 0x40], rax
mov qword [rbp - 0x80], 0xffffffffffffffff
mov rax, qword [0x140129398]
mov r9d, dword [rax + 0xb8]
btr r9d, 0x1f
mov r8d, 0x30c
mov rdx, qword [rbp + 0x20040]
lea rcx, [rsp + 0x40]
call fcn.1400a1920
movzx ebx, al
test al, al
jne 0x140062065
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rdi + 0x28]
cmp byte [rcx], 0xb
jne 0x140061fbf
lea ecx, [rax - 2]
cmp ecx, 1
jbe 0x140062065
mov r8d, 0xa
lea rdx, [rbp - 0x60]
mov ecx, eax
call fcn.1400cd61c
mov rcx, qword [0x140131848]
cmp byte [0x14012bd85], 0
je 0x140061fe8
mov r14d, r15d
jmp 0x14006272b
mov rax, qword [0x140129398]
cmp dword [rax + 0x60], 0
jne 0x140062036
cmp dword [0x1401320c8], 0
jne 0x140062036
cmp byte [0x14012bd0a], 0
jne 0x140062036
test rcx, rcx
jne 0x140062036
mov qword [rsp + 0x20], r15
lea r9, [0x140104c70]
mov r8d, 9
lea rdx, [rbp - 0x60]
lea rcx, [0x1401319c0]
call fcn.140010e80
mov r14d, eax
jmp 0x14006272b
mov qword [rsp + 0x28], rcx
mov dword [rsp + 0x20], 9
xor r9d, r9d
lea r8, [0x140104c70]
lea rdx, [rbp - 0x60]
lea rcx, [0x1401319c0]
call fcn.14000f7a0
mov r14d, eax
jmp 0x14006272b
mov rcx, qword [rbp + 0x20048]
call fcn.1400d3da0
test rax, rax
jne 0x1400620a8
mov rax, qword [0x140131838]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r15
xor r9d, r9d
xor r8d, r8d
lea rdx, str.Out_of_memory.
lea rcx, [0x1401319c0]
call fcn.14000fec0
mov r14d, eax
jmp 0x14006272b
xor r10d, r10d
mov qword [rbp - 0x40], r10
mov qword [rbp - 0x38], rax
mov word [rbp - 0x30], r10w
mov dword [rsp + 0x30], 4
mov qword [rbp - 0x70], r10
mov rax, qword [0x140129398]
mov qword [rbp - 0x68], rax
lea rcx, [rbp - 0x40]
mov qword [rax + 0x18], rcx
test bl, bl
je 0x1400626a4
mov ebx, 2
nop dword [rax]
nop dword [rax + rax]
mov ecx, dword [rsp + 0x4c]
mov rsi, qword [rsp + 0x70]
test ecx, ecx
je 0x140062126
test rsi, rsi
jne 0x140062126
mov r8d, ecx
mov rdx, qword [rsp + 0x78]
lea rcx, [rsp + 0x40]
mov rax, qword [rsp + 0x40]
call qword [rax + 0x20]
xor r10d, r10d
mov ecx, r10d
mov dword [rsp + 0x4c], ecx
mov rsi, qword [rsp + 0x70]
mov word [rsp + 0x6c], r10w
mov edi, r10d
mov r12d, dword [rsp + 0x54]
mov r14d, r10d
cmp r12d, 0x4b0
sete r14b
inc r14d
mov dword [rsp + 0x34], r14d
mov r13d, r14d
mov r9, qword [rsp + 0x78]
test rsi, rsi
jne 0x14006218c
mov ebx, 0x2000
test r9, r9
jne 0x140062179
mov ecx, ebx
call fcn.1400c83d4
mov r9, rax
mov qword [rsp + 0x78], rax
test rax, rax
je 0x1400621dd
mov ecx, dword [rsp + 0x4c]
lea eax, [rcx + 0x2000]
cmp eax, ebx
jbe 0x140062185
sub ebx, ecx
mov edx, ecx
add rdx, r9
jmp 0x1400621f7
mov eax, r13d
mov r8d, ecx
sub r8, rax
add r8, r9
cmp rsi, r8
jbe 0x140062240
mov eax, r9d
sub eax, esi
add ecx, eax
mov dword [rsp + 0x4c], ecx
mov r8d, ecx
mov rdx, rsi
mov rcx, r9
call fcn.1400e5b10
mov ebx, 0x2000
mov r9, qword [rsp + 0x78]
test r9, r9
jne 0x1400621e3
mov ecx, ebx
call fcn.1400c83d4
mov r9, rax
mov qword [rsp + 0x78], rax
test rax, rax
jne 0x1400621e3
mov ecx, dword [rsp + 0x4c]
jmp 0x14006221e
mov ecx, dword [rsp + 0x4c]
lea eax, [rcx + 0x2000]
cmp eax, ebx
jbe 0x1400621f3
sub ebx, ecx
lea rdx, [r9 + rcx]
mov rax, qword [rsp + 0x40]
mov r8d, ebx
lea rcx, [rsp + 0x40]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetElement]
test eax, eax
mov ecx, dword [rsp + 0x4c]
je 0x140062215
add ecx, eax
mov dword [rsp + 0x4c], ecx
mov r9, qword [rsp + 0x78]
mov dword [rsp + 0x50], eax
mov rsi, r9
mov qword [rsp + 0x70], r9
cmp ecx, r13d
setae al
xor r10d, r10d
test al, al
jne 0x14006223b
test ecx, ecx
je 0x140062488
mov ebx, 2
mov r13d, r14d
mov r15d, ecx
add r15, r9
cmp r12d, 0x4b0
jne 0x140062269
movzx eax, r15b
sub al, sil
test al, 1
je 0x140062269
dec r15
cmp r15, rsi
je 0x140062470
cmp rsi, r15
jae 0x1400623ef
cmp edi, 0xffff
jae 0x140062444
cmp r12d, 0x4b0
jne 0x140062294
movzx ecx, word [rsi]
mov word [rsp + 0x38], cx
jmp 0x140062354
mov ebx, 1
movsx edx, byte [rsi]
cmp dl, 0x80
jae 0x1400622ae
movzx ecx, dx
mov word [rsp + 0x38], dx
jmp 0x140062354
cmp r12d, 0xfde9
jne 0x140062303
movzx eax, dl
and al, 0xe0
cmp al, 0xc0
jne 0x1400622c9
mov ecx, 2
mov ebx, ecx
jmp 0x140062317
movzx eax, dl
and al, 0xf0
cmp al, 0xe0
jne 0x1400622de
mov ebx, 3
mov ecx, 2
jmp 0x140062317
and dl, 0xf8
cmp dl, 0xf0
jne 0x1400622f2
mov ebx, 4
mov ecx, 2
jmp 0x140062317
mov eax, edi
mov ecx, 0xfffd
mov word [rbp + rax*2 - 0x30], cx
jmp 0x1400623aa
lea rcx, [rsp + 0x40]
call fcn.1400a18f0
test al, al
mov ecx, 2
cmovne ebx, ecx
mov eax, ebx
add rax, rsi
cmp rax, r15
ja 0x140062411
mov dword [rsp + 0x28], ecx
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
mov r9d, ebx
mov r8, rsi
mov edx, 8
mov ecx, r12d
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
movsxd rcx, eax
cmp ecx, 1
jne 0x14006236d
movzx ecx, word [rsp + 0x38]
cmp cx, 0xa
je 0x1400624c8
cmp cx, 0xd
je 0x1400623c0
mov eax, edi
mov word [rbp + rax*2 - 0x30], cx
jmp 0x1400623aa
mov eax, edi
lea r9, [rbp - 0x30]
lea r9, [r9 + rax*2]
test ecx, ecx
je 0x1400623a4
lea r14d, [rcx + rdi]
cmp r14d, 0xffff
ja 0x1400624f4
mov r8, rcx
add r8, r8
lea rdx, [rsp + 0x38]
mov rcx, r9
call fcn.1400e5b10
mov edi, r14d
jmp 0x1400623ac
mov word [r9], 0xfffd
inc edi
mov eax, ebx
add rsi, rax
cmp rsi, r15
jae 0x140062405
mov ebx, 2
jmp 0x140062272
mov r14d, dword [rsp + 0x34]
lea r13d, [r14 + r14]
mov eax, r13d
add rax, rsi
cmp rax, r15
jbe 0x14006249d
cmp dword [rsp + 0x50], 0
je 0x1400624b7
mov r9, qword [rsp + 0x78]
mov ecx, dword [rsp + 0x4c]
cmp rsi, r15
jne 0x140062452
xor r10d, r10d
mov ecx, r10d
mov dword [rsp + 0x4c], ecx
mov esi, r10d
mov qword [rsp + 0x70], r10
jmp 0x14006245a
mov r9, qword [rsp + 0x78]
mov r14d, dword [rsp + 0x34]
jmp 0x1400623e8
mov r9, qword [rsp + 0x78]
mov r14d, dword [rsp + 0x34]
cmp dword [rsp + 0x50], 0
jne 0x14006243f
xor r10d, r10d
mov ecx, r10d
mov dword [rsp + 0x4c], ecx
mov esi, r10d
mov eax, edi
mov edx, 0xfffd
mov word [rbp + rax*2 - 0x30], dx
inc edi
jmp 0x1400623ec
mov r13d, ebx
jmp 0x1400623e8
mov r9, qword [rsp + 0x78]
mov ecx, dword [rsp + 0x4c]
mov r14d, dword [rsp + 0x34]
mov qword [rsp + 0x70], rsi
xor r10d, r10d
cmp edi, 0xffff
jae 0x140062502
mov ebx, 2
jmp 0x140062152
mov qword [rsp + 0x70], r10
mov dword [rsp + 0x4c], r10d
mov eax, edi
mov ecx, 0xfffd
mov word [rbp + rax*2 - 0x30], cx
inc edi
xor r15d, r15d
cmp edi, 0xffff
jae 0x140062505
mov eax, edi
mov word [rbp + rax*2 - 0x30], r10w
jmp 0x140062505
cmp r12d, 0x4b0
jne 0x1400624ac
movzx eax, word [rsi + 2]
jmp 0x1400624b0
movsx eax, byte [rsi + 1]
cmp eax, 0xa
jne 0x1400624b7
add ebx, ebx
test byte [rsp + 0x48], 8
je 0x1400624c8
mov eax, 0xa
mov word [rsp + 0x38], ax
movsxd rax, ebx
add rax, rsi
mov qword [rsp + 0x70], rax
mov eax, edi
mov ecx, 0xa
mov word [rbp + rax*2 - 0x30], cx
inc edi
xor r15d, r15d
cmp edi, 0xffff
jae 0x140062505
mov word [rbp + rdi*2 - 0x30], r15w
jmp 0x140062505
mov qword [rsp + 0x70], rsi
xor r15d, r15d
mov word [r9], r15w
jmp 0x140062505
xor r15d, r15d
mov eax, edi
test edi, edi
je 0x140062682
cmp word [rbp + rax*2 - 0x32], 0xa
jne 0x14006251a
dec rax
mov word [rbp + rax*2 - 0x30], r15w
mov rdi, qword [rbp + 0x20020]
mov rcx, qword [rdi + 0x20]
cmp byte [rcx], 3
jne 0x14006256c
mov ebx, 2
nop word [rax + rax]
lea r9, [rbp - 0x70]
mov r8, qword [rbp + 0x20028]
mov edx, ebx
mov rcx, qword [rcx + 0x20]
call fcn.14005e2a0
mov r14d, eax
mov dword [rsp + 0x30], eax
mov rcx, qword [rdi + 0x20]
mov rax, qword [rbp - 0x70]
cmp rax, rcx
je 0x140062540
jmp 0x140062591
lea r9, [rbp - 0x70]
mov r8, qword [rbp + 0x20028]
mov edx, 3
call fcn.14005e2a0
mov r14d, eax
mov dword [rsp + 0x30], eax
mov rax, qword [rbp - 0x70]
mov ebx, 2
test rax, rax
je 0x1400625b0
cmp r14d, 6
jne 0x1400625a1
cmp rax, rdi
je 0x1400625b6
mov rcx, qword [rbp + 0x20030]
mov qword [rcx], rax
jmp 0x14006268e
cmp r14d, 6
jne 0x1400625c0
mov dword [rsp + 0x30], 1
jmp 0x1400625ca
cmp r14d, 1
jne 0x14006268e
mov rsi, qword [rbp + 0x20038]
test rsi, rsi
je 0x14006266b
mov qword [0x140132068], rsi
mov rax, qword [0x140129398]
cmp byte [rax + 0xc6], 0
je 0x140062633
movsxd rax, dword [0x140131630]
lea r14, [0x140000000]
mov qword [r14 + rax*8 + 0x1309b0], rsi
call qword [sym.imp.KERNEL32.dll_GetTickCount]
movsxd rdx, dword [0x140131630]
mov dword [r14 + rdx*4 + 0x130370], eax
inc edx
mov dword [0x140131630], edx
cmp edx, 0x190
jl 0x140062633
mov dword [0x140131630], r15d
cmp qword [0x14012bcf0], 0xffffffffffffffff
je 0x140062645
mov rdx, rsi
call fcn.140008848
xor edx, edx
mov rcx, rsi
call fcn.14007b100
mov r14d, eax
mov dword [rsp + 0x30], eax
cmp eax, 1
jne 0x14006268e
mov rcx, qword [0x140131650]
call fcn.14006b6f0
test eax, eax
jne 0x14006267a
mov rax, qword [rbp - 0x68]
inc qword [rax]
xor r10d, r10d
jmp 0x1400620f0
mov r14d, 5
jmp 0x1400626cf
mov r14d, dword [rsp + 0x30]
mov rdi, qword [rbp + 0x20020]
cmp r14d, 4
jne 0x1400626cf
mov rsi, qword [rbp + 0x20028]
mov r14, qword [rbp + 0x20030]
jmp 0x1400626a7
xor r15d, r15d
mov rcx, qword [rdi + 0x28]
cmp byte [rcx], 0xb
jne 0x1400626c9
mov r9, r14
mov r8, rsi
mov edx, 3
mov rcx, qword [rcx + 0x20]
call fcn.14005e2a0
mov r14d, eax
jmp 0x1400626cf
mov r14d, 1
mov rbx, qword [rbp - 0x40]
test rbx, rbx
je 0x14006271b
mov r8d, dword [rbx + 0xc]
test r8d, r8d
je 0x1400626f9
cmp qword [rbx + 0x30], 0
jne 0x1400626f9
mov rax, qword [rbx]
mov rdx, qword [rbx + 0x38]
mov rcx, rbx
call qword [rax + 0x20]
mov dword [rbx + 0xc], r15d
mov word [rbx + 0x2c], r15w
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + reloc.WSOCK32.dll_recv]
mov rcx, qword [rbp - 0x40]
test rcx, rcx
je 0x14006271b
mov rax, qword [rcx]
mov edx, 1
call qword [rax]
nop
mov rcx, qword [rbp - 0x38]
call fcn.1400c83c0
lea r12, vtable.TextStream.0
lea rax, vtable.TextFile.0
mov qword [rsp + 0x40], rax
mov r8d, dword [rsp + 0x4c]
test r8d, r8d
je 0x14006276c
cmp qword [rsp + 0x70], 0
jne 0x14006276c
mov dword [rsp + 0x30], r15d
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0x30]
mov rdx, qword [rsp + 0x78]
mov rcx, qword [rbp - 0x80]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [rsp + 0x4c], r15d
mov word [rsp + 0x6c], r15w
mov rcx, qword [rbp - 0x80]
cmp rcx, 0xffffffffffffffff
je 0x14006279a
mov eax, dword [rsp + 0x48]
and eax, 0x10000003
cmp eax, 0x10000000
je 0x140062792
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbp - 0x80], 0xffffffffffffffff
mov qword [rsp + 0x40], r12
mov rcx, qword [rsp + 0x78]
test rcx, rcx
je 0x1400627af
call fcn.1400c83c0
nop
mov eax, r14d
add rsp, 0x200d8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret