Function at 0x40d410
Capabilities:
Delete file
Enumerate files on windows
Get common file path
Get file attributes
Persist via windows service
Set registry value

Disassembly:
sub esp, 0x364
push ebx
push ebp
push esi
lea eax, [esp + 0xc]
push edi
xor edi, edi
push eax
push 0x20
mov ecx, 0x41d8a8
mov dword [esp + 0x1c], edi
mov dword [esp + 0x18], edi
call fcn.00412080
mov esi, eax
cmp esi, edi
je 0x40d582
mov ebx, dword [sym.imp.SHLWAPI.dll_SHSetValueA]
lea ebp, [esi + 0x108]
push 0x2e
push ebp
call dword [sym.imp.MSVCRT.dll__mbschr]
add esp, 8
test eax, eax
je 0x40d547
mov edi, dword [sym.imp.MSVCRT.dll__mbsicmp]
push str..sys
push eax
call edi
add esp, 8
test eax, eax
jne 0x40d547
push ebp
call fcn.0040d3a0
add esp, 4
test eax, eax
je 0x40d547
mov ecx, dword [esp + 0x378]
mov eax, 1
test ecx, ecx
mov dword [esp + 0x14], eax
je 0x40d7cf
lea ecx, [esi + 4]
push str.AsyncMac
push ecx
call edi
add esp, 8
test eax, eax
jne 0x40d531
mov ecx, 0xa
mov esi, str.SYSTEMCurrentControlSetServicesAsyncMac
lea edi, [esp + 0x3c]
lea edx, [esp + 0x1c]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov ecx, 7
mov esi, str.system32DRIVERS_asyncmac.sys
lea edi, [esp + 0x1c]
mov dword [esp + 0x18], 3
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
lea edi, [esp + 0x1c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + 0x3c]
push ecx
push edx
push 1
push str.ImagePath
push eax
push 0x80000002
call ebx
lea ecx, [esp + 0x18]
push 4
push ecx
push 4
lea edx, [esp + 0x48]
push str.Start
push edx
push 0x80000002
call ebx
push ebp
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push ebp
call fcn.00406260
add esp, 4
jmp 0x40d547
push ebp
call fcn.004084e0
add esp, 4
mov ecx, 0x41d8a8
push 1
push esi
call fcn.00411720
mov esi, dword [esp + 0x10]
lea eax, [esp + 0x10]
inc esi
push eax
push 0x20
mov ecx, 0x41d8a8
mov dword [esp + 0x18], esi
call fcn.00412080
mov esi, eax
test esi, esi
jne 0x40d445
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40d582
mov eax, dword [esp + 0x378]
test eax, eax
je 0x40d72c
lea ecx, [esp + 0x68]
push 0x104
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea ebx, [esp + eax + 0x68]
mov edi, 0x41bb60
or ecx, 0xffffffff
xor eax, eax
mov byte [ebx], 0x5c
inc ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea eax, [esp + 0x16c]
mov edx, ecx
mov esi, edi
mov edi, ebx
push eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x6c]
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x10], eax
je 0x40d72c
mov ebp, dword [sym.imp.MSVCRT.dll_sscanf]
test byte [esp + 0x16c], 0x10
jne 0x40d6ee
lea edx, [esp + 0x198]
push edx
call dword [sym.imp.MSVCRT.dll__mbslwr]
add esp, 4
lea eax, [esp + 0x2ac]
lea ecx, [esp + 0x198]
push eax
push str.addr_a_z_help.dll
push ecx
call ebp
add esp, 0xc
cmp eax, 1
je 0x40d662
lea edx, [esp + 0x2ac]
lea eax, [esp + 0x198]
push edx
push str.gd__a_z_i32.dll
push eax
call ebp
add esp, 0xc
cmp eax, 1
je 0x40d662
lea ecx, [esp + 0x2ac]
lea edx, [esp + 0x198]
push ecx
push str.bj__a_z_rl.dll
push edx
call ebp
add esp, 0xc
cmp eax, 1
jne 0x40d6ee
lea edi, [esp + 0x198]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x68]
push ecx
call fcn.0040d360
add esp, 4
test eax, eax
je 0x40d6ee
mov eax, dword [esp + 0x378]
mov dword [esp + 0x14], 1
test eax, eax
je 0x40d70a
lea edx, [esp + 0x68]
push edx
call fcn.004084e0
push 0x2e
push ebx
call dword [sym.imp.MSVCRT.dll__mbsrchr]
mov edx, eax
mov edi, str..cfg
or ecx, 0xffffffff
xor eax, eax
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]
lea ecx, [esp + 0x74]
push ecx
call fcn.004084e0
add esp, 0x10
mov esi, dword [esp + 0x10]
lea edx, [esp + 0x16c]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
je 0x40d725
jmp 0x40d5e2
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x364
ret
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40d743
mov eax, dword [esp + 0x378]
test eax, eax
je 0x40d7cb
push 0
lea ecx, [esp + 0x6c]
push 0x2b
push ecx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
test eax, eax
je 0x40d7cb
lea edi, [esp + 0x68]
or ecx, 0xffffffff
xor eax, eax
mov ebx, 0x4156f0
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea ebp, [esp + ecx + 0x68]
mov edi, dword [ebx]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea eax, [esp + 0x68]
mov edx, ecx
mov esi, edi
mov edi, ebp
push eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
and eax, 0x10
test al, al
jne 0x40d7c0
mov eax, dword [esp + 0x378]
mov dword [esp + 0x14], 1
test eax, eax
je 0x40d7c0
lea ecx, [esp + 0x68]
push ecx
call fcn.004084e0
add esp, 4
add ebx, 4
cmp ebx, 0x4156fc
jb 0x40d76f
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x364
ret