Function at 0x40e3e0
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x318
cmp dword [0x0041c278], 0xa
jl 0x40e3fa
jmp 0x40ea69
mov eax, 8
imul rax, rax, 0
mov rcx, qword [0x0041c260]
mov rax, qword [rcx + rax]
mov qword [rsp + 0x68], rax
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0x88], rax
jmp 0x40e435
mov rax, qword [rsp + 0x88]
inc rax
mov qword [rsp + 0x88], rax
mov rax, qword [rsp + 0x88]
movsx eax, byte [rax]
test eax, eax
je 0x40e446
jmp 0x40e422
mov rax, qword [rsp + 0x68]
mov rcx, qword [rsp + 0x88]
sub rcx, rax
mov rax, rcx
mov dword [rsp + 0x50], eax
mov eax, 1
imul rax, rax, 0
mov rcx, qword [rsp + 0x68]
movsx eax, byte [rcx + rax]
cmp eax, 0x22
jne 0x40e4a9
cmp dword [rsp + 0x50], 1
jle 0x40e4a9
mov eax, dword [rsp + 0x50]
dec eax
cdqe
mov rcx, qword [rsp + 0x68]
movsx eax, byte [rcx + rax]
cmp eax, 0x22
jne 0x40e4a9
mov rax, qword [rsp + 0x68]
inc rax
mov qword [rsp + 0x68], rax
mov eax, dword [rsp + 0x50]
sub eax, 2
mov dword [rsp + 0x50], eax
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0x80], rax
mov eax, dword [rsp + 0x50]
mov dword [rsp + 0x44], eax
cmp dword [rsp + 0x44], 0x100
jg 0x40e6a1
mov dword [rsp + 0x40], 0
jmp 0x40e4e0
mov eax, dword [rsp + 0x40]
inc eax
mov dword [rsp + 0x40], eax
mov eax, dword [rsp + 0x44]
cmp dword [rsp + 0x40], eax
jge 0x40e509
movsxd rax, dword [rsp + 0x40]
movsxd rcx, dword [rsp + 0x40]
mov rdx, qword [rsp + 0x80]
movzx eax, byte [rdx + rax]
mov byte [rsp + rcx + 0xc0], al
jmp 0x40e4d6
movsxd rax, dword [rsp + 0x44]
mov byte [rsp + rax + 0xc0], 0
lea rdx, [rsp + 0x1d0]
lea rcx, [rsp + 0xc0]
call qword [sym.imp.kernel32.dll_FindFirstFileA]
mov qword [rsp + 0xa8], rax
cmp qword [rsp + 0xa8], 0xffffffffffffffff
je 0x40e6a1
lea rax, [rsp + 0x1fc]
mov qword [rsp + 0xa0], rax
mov rax, qword [rsp + 0xa0]
mov qword [rsp + 0x58], rax
jmp 0x40e56f
mov rax, qword [rsp + 0x58]
inc rax
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x58]
movsx eax, byte [rax]
test eax, eax
je 0x40e57d
jmp 0x40e562
mov rax, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x58]
sub rcx, rax
mov rax, rcx
mov dword [rsp + 0x78], eax
movsxd rax, dword [rsp + 0x44]
lea rax, [rsp + rax + 0xc0]
mov qword [rsp + 0x58], rax
jmp 0x40e5b5
mov rax, qword [rsp + 0x58]
dec rax
mov qword [rsp + 0x58], rax
lea rax, [rsp + 0xc0]
cmp qword [rsp + 0x58], rax
jbe 0x40e5f4
mov eax, 1
imul rax, rax, 0xffffffffffffffff
mov rcx, qword [rsp + 0x58]
movsx eax, byte [rcx + rax]
cmp eax, 0x5c
je 0x40e5f4
mov eax, 1
imul rax, rax, 0xffffffffffffffff
mov rcx, qword [rsp + 0x58]
movsx eax, byte [rcx + rax]
cmp eax, 0x2f
je 0x40e5f4
jmp 0x40e5a8
lea rax, [rsp + 0xc0]
mov rcx, qword [rsp + 0x58]
sub rcx, rax
mov rax, rcx
movsxd rcx, dword [rsp + 0x78]
add rax, rcx
cmp rax, 0x100
jg 0x40e693
mov dword [rsp + 0x40], 0
jmp 0x40e62b
mov eax, dword [rsp + 0x40]
inc eax
mov dword [rsp + 0x40], eax
mov eax, dword [rsp + 0x78]
cmp dword [rsp + 0x40], eax
jge 0x40e656
movsxd rax, dword [rsp + 0x40]
movsxd rcx, dword [rsp + 0x40]
mov rdx, qword [rsp + 0x58]
mov r8, qword [rsp + 0xa0]
movzx eax, byte [r8 + rax]
mov byte [rdx + rcx], al
jmp 0x40e621
movsxd rax, dword [rsp + 0x40]
mov rcx, qword [rsp + 0x58]
mov byte [rcx + rax], 0
lea rax, [rsp + 0xc0]
mov qword [rsp + 0x80], rax
movsxd rax, dword [rsp + 0x40]
mov rcx, qword [rsp + 0x58]
add rcx, rax
mov rax, rcx
lea rcx, [rsp + 0xc0]
sub rax, rcx
mov dword [rsp + 0x44], eax
mov rcx, qword [rsp + 0xa8]
call qword [sym.imp.kernel32.dll_FindClose]
movsxd rax, dword [rsp + 0x44]
mov rcx, qword [rsp + 0x80]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x90], rax
cmp dword [rsp + 0x44], 3
jle 0x40e736
mov eax, 1
imul rax, rax, 0xfffffffffffffffc
mov rcx, qword [rsp + 0x90]
movsx eax, byte [rcx + rax]
cmp eax, 0x2e
jne 0x40e736
mov eax, 1
imul rax, rax, 0xfffffffffffffffd
mov rcx, qword [rsp + 0x90]
movsx eax, byte [rcx + rax]
cmp eax, 0x65
jne 0x40e736
mov eax, 1
imul rax, rax, 0xfffffffffffffffe
mov rcx, qword [rsp + 0x90]
movsx eax, byte [rcx + rax]
cmp eax, 0x78
jne 0x40e736
mov eax, 1
imul rax, rax, 0xffffffffffffffff
mov rcx, qword [rsp + 0x90]
movsx eax, byte [rcx + rax]
cmp eax, 0x65
jne 0x40e736
mov eax, dword [rsp + 0x44]
sub eax, 4
mov dword [rsp + 0x44], eax
movsxd rax, dword [rsp + 0x44]
add rax, 0x13
cmp rax, 0x100
jbe 0x40e766
mov eax, dword [0x0041c278]
inc eax
mov dword [0x0041c278], eax
lea rcx, str.Heap_file_could_not_be_created_because_the_file_name_is_too_long._n
call fcn.0040b9b0
jmp 0x40ea69
lea rax, [rsp + 0xc0]
cmp qword [rsp + 0x80], rax
je 0x40e7b5
mov dword [rsp + 0x48], 0
jmp 0x40e78c
mov eax, dword [rsp + 0x48]
inc eax
mov dword [rsp + 0x48], eax
mov eax, dword [rsp + 0x44]
cmp dword [rsp + 0x48], eax
jge 0x40e7b5
movsxd rax, dword [rsp + 0x48]
movsxd rcx, dword [rsp + 0x48]
mov rdx, qword [rsp + 0x80]
movzx eax, byte [rdx + rax]
mov byte [rsp + rcx + 0xc0], al
jmp 0x40e782
movsxd rax, dword [rsp + 0x44]
lea rax, [rsp + rax + 0xc0]
mov qword [rsp + 0xb0], rax
mov dword [rsp + 0x48], 0
jmp 0x40e7de
mov eax, dword [rsp + 0x48]
inc eax
mov dword [rsp + 0x48], eax
movsxd rax, dword [rsp + 0x48]
cmp rax, 0x13
ja 0x40e80c
movsxd rax, dword [rsp + 0x48]
lea rcx, str._Heap_Profile0.hcl
movsxd rdx, dword [rsp + 0x48]
mov r8, qword [rsp + 0xb0]
movzx eax, byte [rcx + rax]
mov byte [r8 + rdx], al
jmp 0x40e7d4
mov eax, dword [0x0041c278]
add eax, 0x30
mov ecx, 1
imul rcx, rcx, 0xd
mov rdx, qword [rsp + 0xb0]
mov byte [rdx + rcx], al
mov eax, dword [0x0041c278]
inc eax
mov dword [0x0041c278], eax
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
lea rcx, [rsp + 0xc0]
call qword [sym.imp.kernel32.dll_CreateFileA]
mov qword [rsp + 0x70], rax
cmp qword [rsp + 0x70], 0xffffffffffffffff
jne 0x40e8aa
mov dword [0x0041c278], 0xa
lea rcx, [0x00419398]
call fcn.0040b9b0
lea rcx, [rsp + 0xc0]
call fcn.0040b9b0
lea rcx, str._could_not_be_created._n
call fcn.0040b9b0
jmp 0x40ea69
mov eax, dword [rsp + 0x50]
mov dword [rsp + 0x98], eax
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x60]
mov r8d, 4
lea rdx, [rsp + 0x98]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.kernel32.dll_WriteFile]
mov dword [rsp + 0x4c], eax
cmp dword [rsp + 0x4c], 0
je 0x40e90e
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x60]
mov r8d, dword [rsp + 0x50]
mov rdx, qword [rsp + 0x68]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.kernel32.dll_WriteFile]
mov dword [rsp + 0x4c], eax
cmp dword [rsp + 0x4c], 0
je 0x40e940
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x60]
mov r8d, 0x80
mov rdx, qword [rsp + 0x320]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.kernel32.dll_WriteFile]
mov dword [rsp + 0x4c], eax
cmp dword [rsp + 0x4c], 0
je 0x40e98e
mov rax, qword [rsp + 0x320]
mov rcx, qword [rsp + 0x320]
mov rcx, qword [rcx + 0x20]
mov rax, qword [rax + 0x28]
sub rax, rcx
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x60]
mov r8d, eax
mov rax, qword [rsp + 0x320]
mov rdx, qword [rax + 0x20]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.kernel32.dll_WriteFile]
mov dword [rsp + 0x4c], eax
cmp dword [rsp + 0x4c], 0
je 0x40e9da
mov rax, qword [rsp + 0x320]
mov rcx, qword [rsp + 0x320]
mov rcx, qword [rcx]
mov rax, qword [rax + 8]
sub rax, rcx
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x60]
mov r8d, eax
mov rax, qword [rsp + 0x320]
mov rdx, qword [rax]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.kernel32.dll_WriteFile]
mov dword [rsp + 0x4c], eax
cmp dword [rsp + 0x4c], 0
je 0x40ea28
mov rax, qword [rsp + 0x320]
mov rcx, qword [rsp + 0x320]
mov rcx, qword [rcx + 0x10]
mov rax, qword [rax + 0x18]
sub rax, rcx
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x60]
mov r8d, eax
mov rax, qword [rsp + 0x320]
mov rdx, qword [rax + 0x10]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.kernel32.dll_WriteFile]
mov dword [rsp + 0x4c], eax
cmp dword [rsp + 0x4c], 0
jne 0x40ea5e
mov dword [0x0041c278], 0xa
lea rcx, str.Heap_file_
call fcn.0040b9b0
lea rcx, [rsp + 0xc0]
call fcn.0040b9b0
lea rcx, str._could_not_be_written._n
call fcn.0040b9b0
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.kernel32.dll_CloseHandle]
add rsp, 0x318
ret