Function at 0x401f30
Capabilities:
Copy file
Delete file
Get common file path
Move file
Persist via run registry key
Query or enumerate registry value
Set registry value

Disassembly:
sub esp, 0xd20
mov dl, byte [0x4091f4]
push ebx
push ebp
push esi
push edi
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x729]
mov byte [esp + 0x728], dl
mov byte [esp + 0x1c], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x1d]
mov byte [esp + 0x224], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x225]
mov byte [esp + 0x82c], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x82d]
mov byte [esp + 0x120], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x121]
mov byte [esp + 0x930], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0xff
xor eax, eax
lea edi, [esp + 0x931]
xor ebx, ebx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov al, byte [0x408990]
mov dword [esp + 0x14], 0x400
cmp al, 0x31
jne 0x40262c
mov ecx, dword [esp + 0xd34]
mov edi, dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
lea eax, [esp + 0x728]
push 0x104
push eax
push ecx
call edi
test eax, eax
je 0x4025e1
cmp eax, 0x104
ja 0x4025e1
mov esi, dword [esp + 0xd38]
test esi, esi
jne 0x402053
mov edi, 0x408498
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x1c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x402269
lea ecx, [esp + 0x1c]
push 0x104
push ecx
push esi
call edi
test eax, eax
je 0x4025e1
cmp eax, 0x104
ja 0x4025e1
lea edx, [esp + 0x1c]
push edx
push esi
call dword [sym.imp.MSVCRT.dll__stricmp]
add esp, 8
test eax, eax
je 0x402269
mov edi, 0x408fe8
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
jne 0x402229
mov ebp, dword [sym.imp.MSVCRT.dll_sprintf]
push 0x408238
push 0x409810
lea eax, [esp + 0x834]
push 0x40838c
push eax
call ebp
lea ecx, [esp + 0x83c]
push 0
push ecx
call dword [sym.imp.MSVCRT.dll__access]
add esp, 0x18
test eax, eax
jne 0x4025e1
push 0x408238
push 0x40970c
lea edx, [esp + 0x128]
push 0x40838c
push edx
call ebp
add esp, 0x10
lea eax, [esp + 0x120]
lea ecx, [esp + 0x82c]
push 0
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x4025e1
push 0x408fe8
push 0
push 0x408448
push 0x40970c
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
jne 0x402144
push 0x40970c
push 0x408488
push 0x408fe8
call ebp
add esp, 0xc
push 0x408484
push 0x408fe8
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
je 0x4025e1
lea edx, [esp + 0x10]
push edx
push 0xf003f
push 0
push 0x40833c
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4025e1
lea eax, [esp + 0x14]
lea ecx, [esp + 0x930]
push eax
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x1c]
push ecx
push edx
push 0
push 0x408378
push eax
mov dword [esp + 0x2c], 0x400
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x4021c5
mov ecx, 0x100
xor eax, eax
lea edi, [esp + 0x930]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x120]
push 0x408fe8
push ecx
lea edx, [esp + 0x330]
push 0x40847c
push edx
call ebp
lea edi, [esp + 0x338]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + 0x328]
push ecx
mov ecx, dword [esp + 0x14]
push eax
push 1
push 0
push 0x408378
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [esp + 0x10]
mov edi, eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
jne 0x4025e1
jmp 0x402246
push 0x408478
push 0x408fe8
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
je 0x4025e1
mov eax, dword [esp + 0xd38]
lea ecx, [esp + 0x1c]
push eax
push ecx
push 0x408470
push esi
call dword [sym.imp.MSVCRT.dll_fprintf]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x14
push 0
push 0x408134
call dword [sym.imp.MSVCRT.dll__access]
add esp, 8
test eax, eax
je 0x4022ce
push 0x408484
push 0x408134
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
je 0x4025e1
lea edx, [esp + 0x728]
lea eax, [esp + 0x1c]
push edx
push eax
push 0x408128
push 0x408464
push esi
call dword [sym.imp.MSVCRT.dll_fprintf]
push esi
call dword [sym.imp.MSVCRT.dll_fflush]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x1c
jmp 0x402517
mov edi, dword [sym.imp.MSVCRT.dll_fopen]
push 0x408388
push 0x408134
call edi
mov esi, eax
add esp, 8
test esi, esi
je 0x4025e1
lea ecx, [esp + 0x224]
push ecx
push 0
push 0x408448
push 0x408ac4
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
je 0x4025bd
lea edx, [esp + 0x224]
push 0x408484
push edx
call edi
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x4025bd
mov ebp, dword [sym.imp.MSVCRT.dll_fgets]
mov ecx, 0x100
xor eax, eax
lea edi, [esp + 0x328]
rep stosd dword es:[edi], eax
test byte [esi + 0xc], 0x10
jne 0x4023b2
mov edi, 0x408128
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + 0x328]
push ecx
push 0x408128
push eax
call dword [sym.imp.MSVCRT.dll__strnicmp]
add esp, 0xc
test eax, eax
je 0x4023b2
mov ecx, 0x100
xor eax, eax
lea edi, [esp + 0x328]
push esi
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x32c]
push 0x400
push ecx
call ebp
add esp, 0xc
lea edx, [esp + 0x328]
push edx
push 0x408460
push ebx
call dword [sym.imp.MSVCRT.dll_fprintf]
mov al, byte [esi + 0xc]
add esp, 0xc
test al, 0x10
je 0x402347
test byte [esi + 0xc], 0x10
jne 0x4025bd
mov ecx, 0x100
xor eax, eax
lea edi, [esp + 0x328]
push esi
rep stosd dword es:[edi], eax
lea eax, [esp + 0x32c]
push 0x400
push eax
call ebp
mov al, byte [esi + 0xc]
add esp, 0xc
test al, 0x10
jne 0x40245a
mov dl, byte [esp + 0x328]
cmp dl, 0xa
je 0x40245a
lea edi, [esp + 0x328]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp dl, 0x5b
jne 0x40241c
cmp byte [esp + ecx + 0x326], 0x5d
jne 0x40241c
cmp byte [esp + ecx + 0x327], 0xa
je 0x40245a
lea ecx, [esp + 0x328]
push ecx
push 0x408460
push ebx
call dword [sym.imp.MSVCRT.dll_fprintf]
mov ecx, 0x100
xor eax, eax
lea edi, [esp + 0x334]
push esi
lea edx, [esp + 0x338]
push 0x400
rep stosd dword es:[edi], eax
push edx
call ebp
mov al, byte [esi + 0xc]
add esp, 0x18
test al, 0x10
je 0x4023e6
mov edi, dword [sym.imp.MSVCRT.dll_fprintf]
lea eax, [esp + 0x728]
lea ecx, [esp + 0x1c]
push eax
push ecx
push 0x408470
push ebx
call edi
add esp, 0x10
lea edx, [esp + 0x328]
push edx
push 0x408460
push ebx
call edi
mov al, byte [esi + 0xc]
add esp, 0xc
test al, 0x10
jne 0x4024d3
mov ecx, 0x100
xor eax, eax
lea edi, [esp + 0x328]
push esi
rep stosd dword es:[edi], eax
lea eax, [esp + 0x32c]
push 0x400
push eax
call ebp
add esp, 0xc
lea ecx, [esp + 0x328]
push ecx
push 0x408460
push ebx
call dword [sym.imp.MSVCRT.dll_fprintf]
mov al, byte [esi + 0xc]
add esp, 0xc
test al, 0x10
je 0x402492
push ebx
call dword [sym.imp.MSVCRT.dll_fflush]
mov edi, dword [sym.imp.MSVCRT.dll_fclose]
push ebx
call edi
push esi
call edi
add esp, 0xc
push 0x408134
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
je 0x4025e1
lea edx, [esp + 0x224]
push 0x408134
push edx
call dword [sym.imp.KERNEL32.dll_MoveFileA]
test eax, eax
je 0x4025e1
lea edi, [esp + 0x930]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x402562
lea eax, [esp + 0x930]
push 0x20
push eax
call dword [sym.imp.MSVCRT.dll_strchr]
mov esi, eax
push 0
inc esi
push esi
call dword [sym.imp.MSVCRT.dll__access]
add esp, 0x10
test eax, eax
jne 0x402562
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x402562
push eax
push esi
call fcn.00401f30
add esp, 8
mov edi, 0x408fe8
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
jne 0x402588
call fcn.00402640
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0xd20
ret
lea edi, [esp + 0x120]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x4025ad
lea ecx, [esp + 0x120]
push 1
push ecx
call fcn.00403f70
add esp, 8
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0xd20
ret
push esi
mov esi, dword [sym.imp.MSVCRT.dll_fclose]
call esi
add esp, 4
test ebx, ebx
je 0x4025e1
push ebx
call esi
add esp, 4
lea edx, [esp + 0x224]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea edi, [esp + 0x930]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x40262c
lea eax, [esp + 0x930]
push 0x20
push eax
call dword [sym.imp.MSVCRT.dll_strchr]
mov esi, eax
push 0
inc esi
push esi
call dword [sym.imp.MSVCRT.dll__access]
add esp, 0x10
test eax, eax
jne 0x40262c
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x40262c
push eax
push esi
call fcn.00401f30
add esp, 8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xd20
ret