Function at 0x180022b00
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x28]
sub rsp, 0x128
mov qword [rbp - 0x80], 0xfffffffffffffffe
mov rax, qword [0x180208090]
xor rax, rsp
mov qword [rbp + 0x10], rax
mov rbx, r9
mov rdi, rdx
mov r13, rcx
mov rdx, r8
lea rcx, [rsp + 0x68]
call fcn.18000a190
nop
mov rdx, rbx
lea rcx, [rsp + 0x50]
call fcn.18000a190
nop
call fcn.180027940
mov rcx, rax
lea r9, [rsp + 0x50]
lea r8, [rsp + 0x68]
mov rdx, rdi
call fcn.180028b20
test al, al
jne 0x180022b79
xor bl, bl
jmp 0x1800230c7
lea rcx, [rbp - 0x60]
call fcn.180003c60
nop
lea rcx, [rbp - 0x40]
call fcn.18000a280
nop
lea rcx, [rbp - 0x28]
call fcn.18000a280
nop
mov qword [rbp - 0x70], 0
mov qword [rbp - 0x68], 0
lea rdx, [0x180194414]
lea rcx, [rbp - 0x60]
call fcn.180004070
lea rcx, [rbp - 0x40]
call fcn.18000a130
lea rcx, [rbp - 0x28]
call fcn.18000a130
mov qword [rbp - 0x10], 0
mov qword [rbp - 8], 0
mov dword [rbp], 0
mov dword [rbp - 0x6c], 1
mov rdx, rdi
lea rcx, [rbp - 0x60]
call fcn.180003ae0
lea rcx, [rsp + 0x68]
call fcn.1800038c0
lea rcx, [rbp - 0x40]
call fcn.1800038c0
lea rcx, [rsp + 0x68]
call fcn.180005e30
mov rdi, qword [rax]
lea rcx, [rsp + 0x68]
call fcn.1800038c0
mov rbx, qword [rax]
mov rcx, rdi
call fcn.1800038c0
mov rdi, rax
mov rcx, rbx
call fcn.1800038c0
mov rdx, rax
mov r8, rdi
lea rcx, [rbp - 0x40]
call fcn.180024ff0
lea rcx, [rsp + 0x50]
call fcn.1800038c0
lea rcx, [rbp - 0x28]
call fcn.1800038c0
lea rcx, [rsp + 0x50]
call fcn.180005e30
mov rdi, qword [rax]
lea rcx, [rsp + 0x50]
call fcn.1800038c0
mov rbx, qword [rax]
mov rcx, rdi
call fcn.1800038c0
mov rdi, rax
mov rcx, rbx
call fcn.1800038c0
mov rdx, rax
mov r8, rdi
lea rcx, [rbp - 0x28]
call fcn.180024ff0
cmp dword [rbp - 0x6c], 0
je 0x1800230a7
lea rcx, [rbp - 0x70]
call fcn.180024040
test al, al
je 0x1800230a7
lea rcx, [rsp + 0x40]
call fcn.1800038c0
nop
lea rbx, [r13 + 0x30]
mov qword [rsp + 0x40], rbx
mov byte [rsp + 0x48], 0
test rbx, rbx
je 0x180022cf6
mov rcx, qword [rbx]
test rcx, rcx
jne 0x180022cd6
xor al, al
jmp 0x180022cf2
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, 0xffffff7f
je 0x180022cec
xor al, al
jmp 0x180022cf2
mov byte [rbx + 8], 1
mov al, 1
mov byte [rsp + 0x48], al
mov rcx, r13
call fcn.180023140
movzx ebx, al
test al, al
je 0x180023066
lea rdi, [r13 + 0x40]
mov rcx, qword [rdi + 8]
sub rcx, qword [rdi]
movabs rax, 0x8888888888888889
imul rcx
lea r15, [rcx + rdx]
sar r15, 6
mov rax, r15
shr rax, 0x3f
add r15, rax
mov qword [rbp - 0x78], r15
test r15d, r15d
je 0x180022e78
lea rdx, [rbp - 0x70]
call fcn.180023f80
mov edx, eax
mov dword [rsp + 0x34], eax
xor ecx, ecx
mov dword [rsp + 0x30], ecx
test r15d, r15d
je 0x180022e78
xor r15d, r15d
mov qword [rsp + 0x38], r15
mov rax, qword [rbp - 0x78]
nop word [rax + rax]
add r15, qword [rdi]
cmp dword [r15], edx
jne 0x180022e58
lea rcx, [r15 + 0x30]
call fcn.18000a060
mov r14, rax
lea rcx, [rbp - 0x40]
call fcn.18000a060
cmp r14d, eax
jne 0x180022e50
lea rcx, [rbp - 0x28]
call fcn.18000a060
cmp r14d, eax
jne 0x180022e50
lea rcx, [r15 + 0x10]
lea rdx, [rbp - 0x60]
call fcn.18008d6e0
test al, al
je 0x180022e50
xor esi, esi
test r14d, r14d
je 0x180022e35
nop dword [rax + rax]
lea rcx, [rbp - 0x40]
call fcn.1800038c0
mov ebx, esi
shl rbx, 5
mov rdi, qword [rax]
add rdi, rbx
lea rcx, [r15 + 0x30]
call fcn.1800038c0
mov rcx, qword [rax]
add rcx, rbx
mov rdx, rdi
call fcn.18008d6e0
test al, al
je 0x180022e4c
lea rcx, [rbp - 0x28]
call fcn.1800038c0
mov rdi, qword [rax]
add rdi, rbx
lea rcx, [r15 + 0x48]
call fcn.1800038c0
mov rcx, qword [rax]
add rcx, rbx
mov rdx, rdi
call fcn.18008d6e0
test al, al
je 0x180022e4c
inc esi
cmp esi, r14d
jb 0x180022dd0
lea rdi, [r13 + 0x40]
mov ecx, dword [rsp + 0x30]
cmp ecx, 0xffffffff
je 0x180022e78
cmp qword [r13 + 8], 0
jne 0x180022e8a
xor bl, bl
jmp 0x180023066
lea rdi, [r13 + 0x40]
mov rax, qword [rbp - 0x78]
mov edx, dword [rsp + 0x34]
mov ecx, dword [rsp + 0x30]
inc ecx
mov dword [rsp + 0x30], ecx
mov r15, qword [rsp + 0x38]
add r15, 0x78
mov qword [rsp + 0x38], r15
cmp ecx, eax
jb 0x180022d70
cmp qword [r13 + 8], 0
jne 0x180022f60
xor bl, bl
jmp 0x180023066
imul rsi, rcx, 0x78
add rsi, qword [rdi]
lea rbx, [rsi + 4]
inc dword [rbx]
xor edi, edi
mov rcx, qword [r13 + 8]
test rcx, rcx
je 0x180022edd
mov rcx, qword [rcx]
test rcx, rcx
je 0x180022edd
cmp qword [rcx], 0xffffffffffffffff
je 0x180022edd
mov qword [rbp - 0x78], rdi
lea r9d, [rdi + 1]
lea r8, [rbp - 0x74]
xor edx, edx
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rbp - 0x78], eax
cmp eax, 0xffffffff
jne 0x180022ed9
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x180022edd
mov rdi, qword [rbp - 0x78]
mov rdx, qword [rsi + 8]
add rdx, 4
mov rcx, r13
call fcn.180023890
mov rax, qword [r13 + 8]
test rax, rax
je 0x180022f4c
test rbx, rbx
je 0x180022f4c
mov dword [rsp + 0x30], 0
mov rax, qword [rax]
test rax, rax
je 0x180022f4c
mov rcx, qword [rax]
cmp rcx, 0xffffffffffffffff
je 0x180022f4c
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x30]
mov r8d, 4
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x180022f4c
cmp dword [rsp + 0x30], 4
jne 0x180022f4c
mov rcx, r13
call fcn.180023670
mov rdx, rdi
jmp 0x18002305c
dec dword [rbx]
mov rdx, rdi
mov rcx, r13
call fcn.180023890
xor bl, bl
jmp 0x180023066
mov dword [rbp - 0x6c], 1
lea rdx, [rbp - 0x70]
mov rcx, r13
call fcn.180023ba0
test al, al
jne 0x180022f86
mov rcx, r13
call fcn.180023670
xor bl, bl
jmp 0x180023066
xor esi, esi
mov rcx, qword [r13 + 8]
test rcx, rcx
je 0x180022fcc
mov rcx, qword [rcx]
test rcx, rcx
je 0x180022fcc
cmp qword [rcx], 0xffffffffffffffff
je 0x180022fcc
mov qword [rbp - 0x78], rsi
lea r9d, [rsi + 1]
lea r8, [rbp - 0x74]
xor edx, edx
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rbp - 0x78], eax
cmp eax, 0xffffffff
jne 0x180022fc8
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x180022fcc
mov rsi, qword [rbp - 0x78]
mov rdx, qword [rdi + 8]
cmp qword [rdi + 0x10], rdx
je 0x18002303a
mov ecx, 0x78
call fcn.1800037e0
mov rbx, rax
mov qword [rsp + 0x38], rax
mov ecx, dword [rbp - 0x70]
mov dword [rax], ecx
mov ecx, dword [rbp - 0x6c]
mov dword [rax + 4], ecx
mov rcx, qword [rbp - 0x68]
mov qword [rax + 8], rcx
lea rcx, [rax + 0x10]
lea rdx, [rbp - 0x60]
call fcn.1800096b0
nop
lea rcx, [rbx + 0x30]
lea rdx, [rbp - 0x40]
call fcn.18000a190
nop
lea rcx, [rbx + 0x48]
lea rdx, [rbp - 0x28]
call fcn.18000a190
nop
movaps xmm0, xmmword [rbp - 0x10]
movups xmmword [rbx + 0x60], xmm0
mov eax, dword [rbp]
mov dword [rbx + 0x70], eax
add qword [rdi + 8], 0x78
jmp 0x180023046
lea r8, [rbp - 0x70]
mov rcx, rdi
call fcn.180024c80
inc dword [r13 + 0x20]
mov eax, dword [rbp - 0x70]
add qword [r13 + 0x18], rax
mov rcx, r13
call fcn.180023670
mov rdx, rsi
mov rcx, r13
call fcn.180023890
mov bl, 1
mov rcx, r13
call fcn.180023240
nop
mov rdi, qword [rsp + 0x40]
test rdi, rdi
je 0x180023092
cmp byte [rsp + 0x48], 0
je 0x180023092
mov rcx, qword [rdi]
test rcx, rcx
je 0x18002308e
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov byte [rdi + 8], 0
mov qword [rsp + 0x40], 0
lea rcx, [rsp + 0x40]
call fcn.180003800
jmp 0x1800230a9
xor bl, bl
lea rcx, [rbp - 0x28]
call fcn.180005bd0
nop
lea rcx, [rbp - 0x40]
call fcn.180005bd0
nop
lea rcx, [rbp - 0x60]
call fcn.180003b80
nop
lea rcx, [rsp + 0x50]
call fcn.180005bd0
nop
lea rcx, [rsp + 0x68]
call fcn.180005bd0
movzx eax, bl
mov rcx, qword [rbp + 0x10]
xor rcx, rsp
call fcn.1800d8050
add rsp, 0x128
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret