Function at 0x140083320
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rdx
push rsi
push r13
push r14
sub rsp, 0x60
mov esi, r8d
mov r13, rdx
mov r14, rcx
test rdx, rdx
jne 0x140083348
xor eax, eax
add rsp, 0x60
pop r14
pop r13
pop rsi
ret
mov rcx, rdx
mov qword [rsp + 0x50], rdi
call qword [sym.imp.KERNEL32.dll_GlobalLock]
mov rdi, rax
test rax, rax
jne 0x14008336d
mov rdi, qword [rsp + 0x50]
add rsp, 0x60
pop r14
pop r13
pop rsi
ret
mov edx, dword [rax + 0x20]
mov ecx, dword [rax]
mov qword [rsp + 0x58], rbp
add rcx, rax
mov qword [rsp + 0x48], r12
lea rax, [rcx + rdx*4]
mov ecx, dword [rdi + 4]
mov qword [rsp + 0x38], rax
movzx eax, word [rdi + 0xe]
imul eax, ecx
add eax, 0x1f
cdq
and edx, 0x1f
lea ebp, [rdx + rax]
lea eax, [rcx + rcx*2]
lea eax, [rax*8 + 0x31f]
sar ebp, 5
cdq
shl ebp, 2
and edx, 0x1f
lea r12d, [rdx + rax]
sar r12d, 5
shl r12d, 2
mov dword [rsp + 0x98], r12d
test ebp, ebp
jle 0x140083766
test r12d, r12d
jle 0x140083766
mov qword [rsp + 0x80], rbx
movsxd rbx, r12d
mov ecx, 0x40
mov rdx, rbx
mov qword [rsp + 0x40], r15
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GlobalLock]
mov r15, rax
test rax, rax
je 0x1400834e0
mov rdx, rbx
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GlobalLock]
mov rbx, rax
mov qword [rsp + 0x30], rax
test rax, rax
jne 0x140083481
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_GlobalHandle]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_GlobalHandle]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GlobalFree]
xor eax, eax
mov rbx, qword [rsp + 0x80]
mov r15, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x58]
mov r12, qword [rsp + 0x48]
mov rdi, qword [rsp + 0x50]
add rsp, 0x60
pop r14
pop r13
pop rsi
ret
lea rdx, [0x140183390]
mov rcx, r14
call fcn.1400fafe4
mov r14, rax
test rax, rax
jne 0x1400834ee
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GlobalHandle]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GlobalHandle]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GlobalFree]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_GlobalHandle]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_GlobalHandle]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GlobalFree]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
jmp 0x140083459
mov rcx, rax
cmp esi, 1
jne 0x14008366f
lea rdx, [0x14018a2a4]
xor esi, esi
call fcn.1400fe6b4
lea r8, [0x14018a240]
lea rdx, [0x14018a258]
mov rcx, r14
call fcn.1400fe6b4
mov r9d, dword [rdi + 8]
mov r8d, dword [rdi + 4]
lea rdx, [0x14018a260]
mov rcx, r14
call fcn.1400fe6b4
lea rdx, [0x14018a294]
mov rcx, r14
call fcn.1400fe6b4
mov eax, dword [rdi + 8]
xor r12d, r12d
test eax, eax
jle 0x14008375e
movsxd r13, ebp
nop word [rax + rax]
sub eax, r12d
mov r8, r13
mov rcx, r15
dec eax
movsxd rdx, eax
imul rdx, r13
add rdx, qword [rsp + 0x38]
call fcn.1400fb0e0
mov r9d, dword [rsp + 0x98]
mov r8, rdi
mov rdx, rbx
mov rcx, r15
call fcn.1400829d0
mov eax, dword [rdi + 4]
xor ebp, ebp
lea ecx, [rax + rax*2]
test ecx, ecx
jle 0x1400835f0
lea rbx, [r15 + 1]
movzx eax, byte [rbx - 1]
movzx r9d, byte [rbx]
movzx r8d, byte [rbx + 1]
lea rdx, [0x14018a2a8]
mov rcx, r14
mov dword [rsp + 0x20], eax
call fcn.1400fe6b4
inc esi
cmp esi, 5
jne 0x1400835da
lea rdx, [0x14018a26c]
mov rcx, r14
call fcn.1400fe6b4
xor esi, esi
mov eax, dword [rdi + 4]
add ebp, 3
add rbx, 3
lea ecx, [rax + rax*2]
cmp ebp, ecx
jl 0x1400835a2
mov rbx, qword [rsp + 0x30]
mov eax, dword [rdi + 8]
inc r12d
cmp r12d, eax
jl 0x140083560
mov r13, qword [rsp + 0x88]
mov rbp, qword [rsp + 0x30]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_GlobalHandle]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_GlobalHandle]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GlobalFree]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_GlobalHandle]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_GlobalHandle]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GlobalFree]
mov rcx, r14
call fcn.1400fa904
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, 1
jmp 0x14008345b
lea rdx, [0x14018a2b4]
call fcn.1400fe6b4
lea r8, [0x14018a240]
lea rdx, [0x14018a258]
mov rcx, r14
call fcn.1400fe6b4
mov r9d, dword [rdi + 8]
mov r8d, dword [rdi + 4]
lea rdx, [0x14018a260]
mov rcx, r14
call fcn.1400fe6b4
lea rdx, [0x14018a294]
mov rcx, r14
call fcn.1400fe6b4
mov eax, dword [rdi + 8]
xor ebx, ebx
test eax, eax
jle 0x140083607
mov r13, qword [rsp + 0x38]
movsxd rsi, ebp
mov rbp, qword [rsp + 0x30]
sub eax, ebx
mov r8, rsi
mov rcx, r15
dec eax
movsxd rdx, eax
imul rdx, rsi
add rdx, r13
call fcn.1400fb0e0
mov r9d, r12d
mov r8, rdi
mov rdx, rbp
mov rcx, r15
call fcn.1400829d0
mov eax, dword [rdi + 4]
xor r8d, r8d
lea ecx, [rax + rax*2]
test ecx, ecx
jle 0x14008372f
lea rax, [r15 + 2]
nop dword [rax]
movzx edx, byte [rax - 2]
movzx ecx, byte [rax]
add r8d, 3
mov byte [rax], dl
mov byte [rax - 2], cl
mov ecx, dword [rdi + 4]
lea edx, [rcx + rcx*2]
lea rax, [rax + 3]
cmp r8d, edx
jl 0x140083710
mov eax, dword [rdi + 4]
mov r9, r14
mov edx, 1
lea ecx, [rax + rax*2]
movsxd r8, ecx
mov rcx, r15
call fcn.1400faf54
mov eax, dword [rdi + 8]
inc ebx
cmp ebx, eax
jl 0x1400836d1
mov r13, qword [rsp + 0x88]
jmp 0x14008360c
mov rbp, rbx
jmp 0x14008360c
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
xor eax, eax
jmp 0x140083468