Function at 0x1800404a0
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 8], rcx
push rsi
push rdi
sub rsp, 0xbb8
mov rax, qword [0x1800623f8]
xor rax, rsp
mov qword [rsp + 0xba8], rax
mov rax, qword [rsp + 0xbd0]
mov qword [rsp + 0x560], rax
cmp qword [rsp + 0x560], 0
jne 0x18004068e
mov dword [rsp + 0xaf8], 3
mov dword [rsp + 0xafc], 9
mov eax, dword [rsp + 0xafc]
test eax, eax
jle 0x180040565
mov eax, dword [rsp + 0xafc]
cmp eax, 1
jle 0x180040532
mov eax, dword [rsp + 0xaf8]
and eax, 0x15f8
mov dword [rsp + 0xaf8], eax
mov eax, dword [rsp + 0xafc]
sub eax, 2
mov dword [rsp + 0xafc], eax
jmp 0x1800404f5
mov eax, dword [rsp + 0xaf8]
cmp eax, 0x80b
jle 0x180040553
mov eax, dword [rsp + 0xaf8]
and eax, 0x84
mov dword [rsp + 0xaf8], eax
mov eax, dword [rsp + 0xafc]
dec eax
mov dword [rsp + 0xafc], eax
jmp 0x1800404f5
mov dword [rsp + 0xaf0], 4
mov dword [rsp + 0xaf4], 3
mov eax, dword [rsp + 0xaf4]
test eax, eax
jle 0x1800405e9
mov eax, dword [rsp + 0xaf4]
cmp eax, 1
jle 0x1800405b8
mov eax, dword [rsp + 0xaf0]
and eax, 0x1494
mov dword [rsp + 0xaf0], eax
mov eax, dword [rsp + 0xaf4]
sub eax, 2
mov dword [rsp + 0xaf4], eax
jmp 0x18004057b
mov eax, dword [rsp + 0xaf0]
cmp eax, 0x805
jle 0x1800405d7
mov eax, dword [rsp + 0xaf0]
and eax, 0x7e
mov dword [rsp + 0xaf0], eax
mov eax, dword [rsp + 0xaf4]
dec eax
mov dword [rsp + 0xaf4], eax
jmp 0x18004057b
mov dword [rsp + 0x28], 0x104
lea rax, [rsp + 0x8e0]
mov qword [rsp + 0x20], rax
mov r9d, 0xffffffff
lea r8, [0x180065860]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [rsp + 0x8d0], eax
cmp dword [rsp + 0x8d0], 0
jne 0x18004067e
lea rax, [rsp + 0xb18]
lea rcx, [0x18005c430]
mov rdi, rax
mov rsi, rcx
mov ecx, 0xb
rep movsb byte [rdi], byte [rsi]
mov dword [rsp + 0x20], 0x880
lea r9, [rsp + 0xb00]
lea r8, [rsp + 0xb08]
mov edx, 0xa
lea rcx, [rsp + 0xb18]
call fcn.18003bca0
lea rax, [rsp + 0xb08]
mov qword [rsp + 0x560], rax
jmp 0x18004068e
lea rax, [rsp + 0x8e0]
mov qword [rsp + 0x560], rax
cmp qword [0x180065968], 0
je 0x1800406a6
mov rcx, qword [rsp + 0x560]
call qword [0x180065968]
mov dword [rsp + 0x8c0], 0
mov rcx, qword [rsp + 0x560]
call fcn.18004ae24
inc rax
mov dword [rsp + 0x8c0], eax
mov dword [rsp + 0xb30], 0
mov dword [rsp + 0xb28], 0x15
cmp dword [rsp + 0xb28], 0
jle 0x18004073e
mov eax, dword [rsp + 0xb28]
cdq
and eax, 1
xor eax, edx
sub eax, edx
cdqe
add rax, 4
cmp rax, 4
jbe 0x180040720
mov dword [rsp + 0xb30], 4
mov eax, dword [rsp + 0xb28]
dec eax
mov dword [rsp + 0xb28], eax
jmp 0x1800406de
mov dword [rsp + 0xb30], 0
mov eax, dword [rsp + 0xb28]
sub eax, 2
mov dword [rsp + 0xb28], eax
jmp 0x1800406de
mov dword [rsp + 0xb34], 7
mov dword [rsp + 0xb2c], 0xa
mov eax, dword [rsp + 0xb2c]
test eax, eax
jle 0x1800407c4
mov eax, dword [rsp + 0xb2c]
cmp eax, 1
jle 0x180040791
mov eax, dword [rsp + 0xb34]
and eax, 0x23c7
mov dword [rsp + 0xb34], eax
mov eax, dword [rsp + 0xb2c]
sub eax, 2
mov dword [rsp + 0xb2c], eax
jmp 0x180040754
mov eax, dword [rsp + 0xb34]
cmp eax, 0x80c
jle 0x1800407b2
mov eax, dword [rsp + 0xb34]
and eax, 0x85
mov dword [rsp + 0xb34], eax
mov eax, dword [rsp + 0xb2c]
dec eax
mov dword [rsp + 0xb2c], eax
jmp 0x180040754
movsxd rax, dword [rsp + 0x8c0]
shl rax, 1
mov dword [rsp + 0x40], eax
cmp dword [rsp + 0x40], 0x208
jbe 0x1800407e5
mov dword [rsp + 0x40], 0x208
mov dword [rsp + 0x160], 0
lea rax, [rsp + 0x164]
mov rdi, rax
xor eax, eax
mov ecx, 0x3fc
rep stosb byte [rdi], al
lea rcx, [0x180065860]
call fcn.18004a2d0
mov dword [rsp + 0x20], 0
xor r9d, r9d
mov r8d, eax
lea rdx, [0x180065860]
lea rcx, [rsp + 0x160]
call fcn.1800418b0
test eax, eax
je 0x180040858
lea r9, [rsp + 0x6b0]
mov r8d, dword [rsp + 0x40]
mov rdx, qword [rsp + 0x560]
lea rcx, [rsp + 0x160]
call fcn.1800418f0
lea rcx, [0x180065860]
call fcn.18004a2d0
test rax, rax
jne 0x1800408e4
mov dword [rsp + 0xb38], 4
mov dword [rsp + 0xb3c], 0x11
cmp dword [rsp + 0xb3c], 0
jle 0x1800408df
mov eax, dword [rsp + 0xb3c]
cdq
and eax, 1
xor eax, edx
sub eax, edx
cdqe
add rax, 4
cmp rax, 4
jbe 0x1800408c1
mov dword [rsp + 0xb38], 4
mov eax, dword [rsp + 0xb3c]
dec eax
mov dword [rsp + 0xb3c], eax
jmp 0x18004087f
mov dword [rsp + 0xb38], 4
mov eax, dword [rsp + 0xb3c]
sub eax, 2
mov dword [rsp + 0xb3c], eax
jmp 0x18004087f
jmp 0x180040bbe
mov dword [rsp + 0xb40], 0
jmp 0x180040901
mov eax, dword [rsp + 0xb40]
inc eax
mov dword [rsp + 0xb40], eax
cmp dword [rsp + 0xb40], 0xa
jge 0x180040bbe
mov dword [rsp + 0xb90], 0
mov dword [rsp + 0xb8c], 0xe
cmp dword [rsp + 0xb8c], 0
jle 0x180040985
mov eax, dword [rsp + 0xb8c]
cdq
and eax, 1
xor eax, edx
sub eax, edx
cdqe
add rax, 4
cmp rax, 4
jbe 0x180040968
mov dword [rsp + 0xb90], 4
mov eax, dword [rsp + 0xb8c]
sub eax, 2
mov dword [rsp + 0xb8c], eax
jmp 0x180040925
mov dword [rsp + 0xb90], 4
mov eax, dword [rsp + 0xb8c]
dec eax
mov dword [rsp + 0xb8c], eax
jmp 0x180040925
lea rax, [rsp + 0xb60]
lea rcx, [0x18005c440]
mov rdi, rax
mov rsi, rcx
mov ecx, 0x14
rep movsb byte [rdi], byte [rsi]
mov dword [rsp + 0x20], 0x20df
lea r9, [rsp + 0xb88]
lea r8, [rsp + 0xb48]
mov edx, 0x13
lea rcx, [rsp + 0xb60]
call fcn.18003bca0
mov eax, dword [rsp + 0xb40]
mov dword [rsp + 0x20], eax
lea r9, [0x180065860]
lea r8, [rsp + 0xb48]
mov edx, 0x104
lea rcx, [rsp + 0x50]
call fcn.180041820
mov qword [rsp + 0xb78], 0xffffffffffffffff
mov dword [rsp + 0xb84], 0
mov dword [rsp + 0xb80], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov r8d, 1
mov edx, 0x40000000
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rsp + 0xb78], rax
cmp qword [rsp + 0xb78], 0xffffffffffffffff
jne 0x180040a60
jmp 0x1800408f1
mov dword [rsp + 0xba0], 5
mov dword [rsp + 0xb98], 8
mov eax, dword [rsp + 0xb98]
test eax, eax
jle 0x180040ae6
mov eax, dword [rsp + 0xb98]
cmp eax, 1
jle 0x180040ab3
mov eax, dword [rsp + 0xba0]
and eax, 0xc22
mov dword [rsp + 0xba0], eax
mov eax, dword [rsp + 0xb98]
sub eax, 2
mov dword [rsp + 0xb98], eax
jmp 0x180040a76
mov eax, dword [rsp + 0xba0]
cmp eax, 0x80a
jle 0x180040ad4
mov eax, dword [rsp + 0xba0]
and eax, 0x83
mov dword [rsp + 0xba0], eax
mov eax, dword [rsp + 0xb98]
dec eax
mov dword [rsp + 0xb98], eax
jmp 0x180040a76
mov dword [rsp + 0xb94], 4
mov dword [rsp + 0xb9c], 3
mov eax, dword [rsp + 0xb9c]
test eax, eax
jle 0x180040b6a
mov eax, dword [rsp + 0xb9c]
cmp eax, 1
jle 0x180040b39
mov eax, dword [rsp + 0xb94]
and eax, 0xdd8
mov dword [rsp + 0xb94], eax
mov eax, dword [rsp + 0xb9c]
sub eax, 2
mov dword [rsp + 0xb9c], eax
jmp 0x180040afc
mov eax, dword [rsp + 0xb94]
cmp eax, 0x805
jle 0x180040b58
mov eax, dword [rsp + 0xb94]
and eax, 0x7e
mov dword [rsp + 0xb94], eax
mov eax, dword [rsp + 0xb9c]
dec eax
mov dword [rsp + 0xb9c], eax
jmp 0x180040afc
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0xb84]
mov r8d, dword [rsp + 0x40]
lea rdx, [rsp + 0x6b0]
mov rcx, qword [rsp + 0xb78]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [rsp + 0xb80], eax
cmp dword [rsp + 0xb80], 0
je 0x180040bab
mov eax, dword [rsp + 0x40]
mov rcx, qword [rsp + 0xb78]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1800408f1
mov rcx, qword [rsp + 0xba8]
xor rcx, rsp
call fcn.180049ea0
add rsp, 0xbb8
pop rdi
pop rsi
ret