Function at 0x401930
Capabilities:
Delete file
Get common file path
Write file on windows

Disassembly:
sub esp, 0x428
lea eax, [esp + 8]
push ebx
push ebp
push esi
mov esi, dword [0x408be8]
push edi
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea ecx, [esp + 0x120]
lea edx, [esp + 0x18]
push ecx
push 0
push 0x408150
push edx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
lea eax, [esp + 0x330]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea ecx, [esp + 0x18]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea edi, [esp + 0x18]
or ecx, 0xffffffff
xor eax, eax
mov bl, 0x5c
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp byte [esp + ecx + 0x17], bl
jne 0x4019b5
lea edi, [esp + 0x18]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [esp + ecx + 0x17], al
mov cl, byte [esp + 0x18]
lea edx, [esp + 0x18]
test cl, cl
lea eax, [esp + 0x228]
je 0x4019df
cmp cl, bl
jne 0x4019d4
mov byte [eax], bl
mov byte [eax + 1], bl
inc eax
jmp 0x4019d6
mov byte [eax], cl
mov cl, byte [edx + 1]
inc edx
inc eax
test cl, cl
jne 0x4019c8
push 0
push 0x80
push 2
push 0
push 0
lea edx, [esp + 0x134]
push 0x40000000
push edx
mov byte [eax], 0
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x401b9c
push 0xa
push esi
call fcn.00402110
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
je 0x401b2d
jmp 0x401a2a
mov eax, dword [esp + 0x14]
mov byte [eax], 0
push 0x25
push esi
call fcn.00402110
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x401adb
push 0xa
push str._CLS_PATH_
push ebx
call fcn.00402050
add esp, 0xc
test eax, eax
jne 0x401abe
mov edi, ebx
push eax
lea eax, [esp + 0x14]
sub edi, esi
push eax
push edi
push esi
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
push ebp
call esi
cmp dword [esp + 0x10], edi
jne 0x401ba9
lea ecx, [esp + 0x10]
push 0
push ecx
lea edi, [esp + 0x230]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edx, [esp + 0x230]
push ecx
push edx
push ebp
call esi
lea edi, [esp + 0x228]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x10]
not ecx
dec ecx
cmp eax, ecx
jne 0x401bcb
lea esi, [ebx + 0xa]
jmp 0x401a2d
mov ecx, ebx
lea eax, [esp + 0x10]
sub ecx, esi
push 0
inc ecx
push eax
push ecx
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea esi, [ebx + 1]
jmp 0x401a2d
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
push 0
dec ecx
push edx
push ecx
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x10]
not ecx
dec ecx
cmp eax, ecx
jne 0x401bd4
mov eax, dword [esp + 0x14]
push 0xa
lea esi, [eax + 1]
push esi
call fcn.00402110
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
jne 0x401a26
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, str.Hfqsqp_:qlq
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x330]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push eax
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x124]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
push 0x408140
lea ecx, [esp + 0x33c]
push 0x40813c
push ecx
push 0
call fcn.004021f7
add esp, 0x18
test eax, eax
je 0x401bf6
lea edx, [esp + 0x120]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x428
ret
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x120]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x428
ret
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x401b8e
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esp + 0x120]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x428
ret
lea eax, [esp + 0x120]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x428
ret