Function at 0x180041670
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
sub rsp, 0x128
mov qword [rsp + 0xc0], 0xfffffffffffffffe
mov rax, qword [0x1800891a0]
xor rax, rsp
mov qword [rsp + 0x118], rax
mov dword [rsp + 0x50], 1
mov eax, dword [rsp + 0x50]
cdq
sub eax, edx
sar eax, 1
cmp eax, 0x32
jle 0x1800416d7
xor r9d, r9d
lea r8, [0x18008dec4]
lea rdx, [0x18008dea4]
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxA]
mov rcx, qword [rsp + 0x148]
call fcn.180019520
movzx eax, al
test eax, eax
je 0x1800416f2
xor eax, eax
jmp 0x180041d24
mov rax, qword [rsp + 0x130]
add rax, 0x30
mov rcx, rax
call fcn.180019520
movzx eax, al
test eax, eax
je 0x180041714
xor eax, eax
jmp 0x180041d24
mov rax, qword [rsp + 0x130]
mov rdx, qword [rax + 0x60]
mov rcx, qword [rsp + 0x130]
call fcn.180041410
movzx eax, al
test eax, eax
jne 0x180041867
mov eax, 8
mov word [rsp + 0x40], ax
movsx rax, word [rsp + 0x40]
lea rcx, [0x180088e40]
cmp dword [rcx + rax*4], 1
jne 0x180041777
movsx rax, word [rsp + 0x40]
lea rcx, [0x180088e40]
mov eax, dword [rcx + rax*4]
inc eax
movsx rcx, word [rsp + 0x40]
lea rdx, [0x180088e40]
mov dword [rdx + rcx*4], eax
call fcn.1800238f0
test rax, rax
je 0x1800417ed
call fcn.1800238f0
cmp qword [rax + 0x830], 0
je 0x1800417ed
mov rax, qword [rsp + 0x130]
add rax, 0x30
mov rcx, rax
call fcn.18000b6b0
mov qword [rsp + 0x88], rax
call fcn.1800238f0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 4
xor r9d, r9d
mov r8d, 3
mov edx, 0x40000000
mov rcx, qword [rsp + 0x88]
call qword [rax + 0x830]
mov qword [rsp + 0x70], rax
jmp 0x1800417f6
mov qword [rsp + 0x70], 0
mov rax, qword [rsp + 0x130]
mov rcx, qword [rsp + 0x70]
mov qword [rax + 0x60], rcx
mov rax, qword [rsp + 0x130]
mov rdx, qword [rax + 0x60]
mov rcx, qword [rsp + 0x130]
call fcn.180041410
movzx eax, al
test eax, eax
jne 0x18004182e
xor eax, eax
jmp 0x180041d24
mov rax, qword [rsp + 0x130]
add rax, 0x30
mov rcx, rax
call fcn.18000b6b0
mov rcx, rax
call fcn.18001f050
mov r9d, 2
xor r8d, r8d
xor edx, edx
mov rax, qword [rsp + 0x130]
mov rcx, qword [rax + 0x60]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
call fcn.1800427b0
mov rcx, qword [rsp + 0x130]
sub rax, qword [rcx + 0x70]
xor edx, edx
mov ecx, 0x2710
div rcx
mov dword [rsp + 0x58], eax
mov dword [rsp + 0x48], 0
mov edx, 1
lea rcx, [rsp + 0x100]
call fcn.18003cfc0
lea rcx, [rsp + 0x100]
call fcn.18001c230
nop
mov dword [rsp + 0xf8], 0
mov r9d, 8
mov r8b, reloc.OLEAUT32.dll_SafeArrayGetDim
mov rdx, qword [rsp + 0x140]
lea rcx, [rsp + 0xe0]
call fcn.180029bd0
mov qword [rsp + 0xb0], rax
mov rax, qword [rsp + 0xb0]
mov qword [rsp + 0x78], rax
mov eax, dword [rsp + 0x138]
add eax, 0x30
mov dword [rsp + 0x60], eax
mov rcx, qword [rsp + 0x130]
add rcx, 0x18
mov qword [rsp + 0xa8], rcx
mov r9d, 8
mov r8b, reloc.OLEAUT32.dll_SafeArrayGetDim
mov edx, dword [rsp + 0x58]
lea rcx, [rsp + 0xc8]
call fcn.180029780
mov qword [rsp + 0x98], rax
mov rax, qword [rsp + 0x98]
mov qword [rsp + 0xb8], rax
mov rdx, qword [rsp + 0xb8]
lea rcx, [rsp + 0x100]
call fcn.180020f80
mov dx, 0x3a
mov rcx, rax
call fcn.18003d420
mov rcx, qword [rsp + 0xa8]
mov rdx, rcx
mov rcx, rax
call fcn.180020f80
mov dx, 0x3a
mov rcx, rax
call fcn.18003d420
mov ecx, dword [rsp + 0x60]
movzx edx, cx
mov rcx, rax
call fcn.18003d420
mov dx, 0x3a
mov rcx, rax
call fcn.18003d420
mov rdx, qword [rsp + 0x78]
mov rcx, rax
call fcn.180020f80
mov dx, 0x3a
mov rcx, rax
call fcn.18003d420
mov rdx, qword [rsp + 0x148]
mov rcx, rax
call fcn.180020f80
mov r8, 0xffffffffffffffff
lea rdx, [0x18008decc]
mov rcx, rax
call fcn.180021000
nop
lea rcx, [rsp + 0xc8]
call fcn.1800119b0
nop
lea rcx, [rsp + 0xe0]
call fcn.1800119b0
mov eax, 4
imul rax, rax, 0
lea rcx, [0x180088e40]
mov eax, dword [rcx + rax]
xor edx, edx
mov ecx, SafeArrayGetElement
div rcx
mov rax, rdx
mov dword [rsp + 0x54], eax
mov eax, 4
imul rax, rax, 0
lea rcx, [0x180088e40]
movsxd rdx, dword [rsp + 0x54]
lea r8, [0x180088e40]
mov eax, dword [rcx + rax]
mov dword [r8 + rdx*4], eax
mov eax, 4
imul rax, rax, 0
lea rcx, [0x180088e40]
mov eax, dword [rcx + rax]
inc eax
mov ecx, 4
imul rcx, rcx, 0
lea rdx, [0x180088e40]
mov dword [rdx + rcx], eax
mov r8d, 0x3e8
mov rax, qword [rsp + 0x130]
mov rdx, qword [rax + 0x68]
mov rcx, qword [rsp + 0x130]
call fcn.180042670
mov byte [rsp + 0x44], al
mov dword [rsp + 0x5c], 1
mov eax, dword [rsp + 0x5c]
cdq
sub eax, edx
sar eax, 1
cmp eax, 0x32
jle 0x180041ab7
xor r9d, r9d
lea r8, [0x18008ded4]
lea rdx, [0x18008dedc]
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxA]
mov r9d, 2
xor r8d, r8d
xor edx, edx
mov rax, qword [rsp + 0x130]
mov rcx, qword [rax + 0x60]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rsp + 0x4c], eax
cmp dword [rsp + 0x4c], 0xffffffff
je 0x180041af6
cmp dword [rsp + 0x4c], 0x2faf080
jbe 0x180041af6
mov rcx, qword [rsp + 0x130]
call fcn.1800423b0
lea rcx, [rsp + 0x100]
call fcn.1800079e0
shl rax, 1
mov qword [rsp + 0x80], rax
lea rcx, [rsp + 0x100]
call fcn.180011c00
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0xf8]
mov rcx, qword [rsp + 0x80]
mov r8d, ecx
mov rdx, rax
mov rax, qword [rsp + 0x130]
mov rcx, qword [rax + 0x60]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [rsp + 0x48], eax
cmp dword [rsp + 0x48], 0
je 0x180041b69
mov rax, qword [rsp + 0x130]
mov rcx, qword [rax + 0x60]
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
cmp dword [rsp + 0x48], 0
je 0x180041b94
mov rax, qword [rsp + 0x130]
mov rdx, qword [rax + 0x60]
mov rcx, qword [rsp + 0x130]
call fcn.180041410
movzx eax, al
test eax, eax
jne 0x180041ce9
mov rax, qword [rsp + 0x130]
mov rdx, qword [rax + 0x60]
mov rcx, qword [rsp + 0x130]
call fcn.180041410
movzx eax, al
test eax, eax
je 0x180041bc6
mov rax, qword [rsp + 0x130]
mov rcx, qword [rax + 0x60]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.1800238f0
test rax, rax
je 0x180041c3c
call fcn.1800238f0
cmp qword [rax + 0x830], 0
je 0x180041c3c
mov rax, qword [rsp + 0x130]
add rax, 0x30
mov rcx, rax
call fcn.180011c00
mov qword [rsp + 0x90], rax
call fcn.1800238f0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 4
xor r9d, r9d
mov r8d, 3
mov edx, 0x40000000
mov rcx, qword [rsp + 0x90]
call qword [rax + 0x830]
mov qword [rsp + 0x68], rax
jmp 0x180041c45
mov qword [rsp + 0x68], 0
mov rax, qword [rsp + 0x130]
mov rcx, qword [rsp + 0x68]
mov qword [rax + 0x60], rcx
mov r9d, 2
xor r8d, r8d
xor edx, edx
mov rax, qword [rsp + 0x130]
mov rcx, qword [rax + 0x60]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov rax, qword [rsp + 0x130]
add rax, 0x30
mov rcx, rax
call fcn.18000b6b0
mov rcx, rax
call fcn.18001f050
lea rcx, [rsp + 0x100]
call fcn.1800079e0
shl rax, 1
mov qword [rsp + 0xa0], rax
lea rcx, [rsp + 0x100]
call fcn.180011c00
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0xf8]
mov rcx, qword [rsp + 0xa0]
mov r8d, ecx
mov rdx, rax
mov rax, qword [rsp + 0x130]
mov rcx, qword [rax + 0x60]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [rsp + 0x48], eax
movzx eax, byte [rsp + 0x44]
test eax, eax
je 0x180041d0b
mov rax, qword [rsp + 0x130]
mov rdx, qword [rax + 0x68]
mov rcx, qword [rsp + 0x130]
call fcn.180042630
mov eax, dword [rsp + 0x48]
mov dword [rsp + 0x64], eax
lea rcx, [rsp + 0x100]
call fcn.1800119b0
mov eax, dword [rsp + 0x64]
mov rcx, qword [rsp + 0x118]
xor rcx, rsp
call fcn.18004e350
add rsp, 0x128
ret