Function at 0x409320
Capabilities:
Delete file
Enumerate files on windows
Get disk information
Query environment variable

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x669c
call fcn.0041fc00
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea eax, [esp + 0x6a4]
push edi
push 0x1000
push eax
push str.localappdata
call esi
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [esp + 0x6a8]
push eax
call ebx
test eax, eax
jne 0x409375
push 0x1000
lea eax, [esp + 0x6ac]
push eax
push str.appdata
call esi
lea eax, [esp + 0x6a8]
push eax
call ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcatW]
test eax, eax
jle 0x40944f
push str..exe
lea eax, [esp + 0x6ac]
push eax
call ebx
lea eax, [esp + 0x458]
push eax
lea eax, [esp + 0x6ac]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x40944f
push 0x2000
lea eax, [esp + 0x26ac]
push 0
push eax
call fcn.0040a690
add esp, 0xc
lea eax, [esp + 0x6a8]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [eax - 4]
push esi
lea eax, [esp + 0x6ac]
push eax
lea eax, [esp + 0x26b0]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
lea esi, [esp + esi*2 + 0x26a6]
nop dword [eax]
nop word [eax + eax]
lea eax, [esp + 0x484]
push eax
lea eax, [esp + 0x26ac]
push eax
call ebx
lea eax, [esp + 0x26a8]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
xor eax, eax
mov word [esi], ax
lea eax, [esp + 0x458]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x409410
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov esi, dword [ebp + 8]
cmp esi, 4
jne 0x40961e
mov ebx, dword [ebp + 0xc]
mov edi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push 0
push 0
mov ebx, dword [ebx + 0xc]
push 0
push 0
push 0xffffffffffffffff
push ebx
push 0
push 0
mov dword [esp + 0x30], 0
call edi
mov esi, eax
push esi
call fcn.0040ba54
add esp, 4
mov dword [esp + 0x14], eax
push 0
push 0
push esi
mov esi, eax
push esi
push 0xffffffffffffffff
push ebx
push 0
push 0
call edi
lea eax, [esp + 0x58]
push eax
push str._2hhx
push esi
call fcn.00408f80
add esp, 0xc
test eax, eax
jle 0x4094e3
mov eax, dword [esp + 0x10]
inc eax
mov dword [esp + 0x10], eax
cmp eax, 0x200
jae 0x4094e3
lea ecx, [esp + 0x58]
add esi, 2
add eax, ecx
push eax
push str._2hhx
push esi
call fcn.00408f80
add esp, 0xc
test eax, eax
jg 0x4094b7
lea edx, [esp + 0x58]
mov ecx, edx
call fcn.00408c10
test eax, eax
je 0x409571
mov eax, 0x118
mov ecx, 0x42c9c0
nop dword [eax]
mov byte [ecx], 0
lea ecx, [ecx + 1]
sub eax, 1
jne 0x409500
mov eax, 0x140
mov ecx, 0x42c9a0
mov byte [ecx], 0
lea ecx, [ecx + 1]
sub eax, 1
jne 0x409515
mov eax, 0x6c
mov ecx, 0x42c6c4
nop word [eax + eax]
mov byte [ecx], 0
lea ecx, [ecx + 1]
sub eax, 1
jne 0x409530
mov dword [0x42c730], eax
mov ecx, 0x42c734
mov eax, 0x190
nop word [eax + eax]
mov byte [ecx], 0
lea ecx, [ecx + 1]
sub eax, 1
jne 0x409550
mov dword [0x42c6c0], eax
call fcn.00406f00
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 1
push 0x5003b0
call fcn.0040ba5f
mov dword [0x42c4f8], eax
add esp, 8
mov eax, dword [ebp + 0xc]
mov edx, dword [eax + 8]
mov ecx, dword [eax + 4]
call fcn.004082b0
mov eax, dword [0x42c4f8]
test eax, eax
je 0x4095a5
push eax
call fcn.0040ba6a
add esp, 4
mov eax, 0x118
mov ecx, 0x42c9c0
nop
mov byte [ecx], 0
lea ecx, [ecx + 1]
sub eax, 1
jne 0x4095b0
mov eax, 0x140
mov ecx, 0x42c9a0
mov byte [ecx], 0
lea ecx, [ecx + 1]
sub eax, 1
jne 0x4095c5
mov eax, 0x6c
mov ecx, 0x42c6c4
nop word [eax + eax]
mov byte [ecx], 0
lea ecx, [ecx + 1]
sub eax, 1
jne 0x4095e0
mov dword [0x42c730], eax
mov ecx, 0x42c734
mov eax, 0x190
nop word [eax + eax]
mov byte [ecx], 0
lea ecx, [ecx + 1]
sub eax, 1
jne 0x409600
mov dword [0x42c6c0], eax
call fcn.00406f00
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_AllocConsole]
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push 3
call dword [sym.imp.KERNEL32.dll_SetConsoleCP]
mov dword [esp + 0x10], 0
cmp esi, 2
jne 0x4096d1
mov eax, dword [ebp + 0xc]
mov edi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push 0
push 0
mov ebx, dword [eax + 4]
push 0
push 0
push 0xffffffffffffffff
push ebx
push 0
push 0
call edi
mov esi, eax
push esi
call fcn.0040ba54
add esp, 4
mov dword [esp + 0x14], eax
push 0
push 0
push esi
push eax
push 0xffffffffffffffff
push ebx
push 0
push 0
call edi
mov ebx, dword [esp + 0x14]
lea eax, [esp + 0x258]
push eax
push str._2hhx
push ebx
xor esi, esi
call fcn.00408f80
add esp, 0xc
test eax, eax
jle 0x4096c8
inc esi
cmp esi, 0x200
jae 0x4096c8
lea eax, [esp + 0x258]
add ebx, 2
add eax, esi
push eax
push str._2hhx
push ebx
call fcn.00408f80
add esp, 0xc
test eax, eax
jg 0x4096a0
lea eax, [esp + 0x258]
jmp 0x4096e3
lea eax, [esp + 0x10]
mov ecx, 0x65
push eax
call fcn.004092b0
add esp, 4
mov dword [esp + 0x14], eax
mov ecx, 0x6a
lea eax, [esp + 0x10]
push eax
call fcn.004092b0
add esp, 4
mov edi, eax
push 0
push 0
push 0xffffffffffffffff
push edi
push 1
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov esi, eax
lea ecx, [esi*4]
push ecx
call fcn.0040ba54
add esp, 4
mov ebx, eax
push esi
mov esi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push ebx
push 0xffffffffffffffff
push edi
push 1
push 0
call esi
cmp dword [esp + 0x10], 1
mov dword [0x42c4fc], ebx
jbe 0x409775
cmp word [ebx], 0x2e
je 0x409775
mov eax, 0x2e
push 0x3e
mov word [esp + 0x1c], ax
lea eax, [esp + 0x1e]
push 0
push eax
call fcn.0040a690
add esp, 0xc
lea eax, [esp + 0x18]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea ebx, [esp + 0x18]
mov dword [0x42c4fc], ebx
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov dword [0x42c618], eax
mov ecx, 0x6b
lea eax, [esp + 0x10]
push eax
call fcn.004092b0
add esp, 4
mov ebx, eax
push 0
push 0
push 0xffffffffffffffff
push ebx
push 1
push 0
call esi
mov esi, eax
lea ecx, [esi*4]
push ecx
call fcn.0040ba54
add esp, 4
mov edi, eax
push esi
push edi
push 0xffffffffffffffff
push ebx
push 1
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push str.Start_decrypting_files..._n
mov dword [0x42c61c], edi
call fcn.00408160
mov edx, dword [esp + 0x18]
add esp, 4
mov ecx, edx
call fcn.00408c10
test eax, eax
je 0x409861
mov eax, 0x118
mov ecx, 0x42c9c0
mov byte [ecx], 0
lea ecx, [ecx + 1]
sub eax, 1
jne 0x4097f1
mov eax, 0x140
mov ecx, 0x42c9a0
mov byte [ecx], 0
lea ecx, [ecx + 1]
sub eax, 1
jne 0x409806
mov eax, 0x6c
mov ecx, 0x42c6c4
nop dword [eax + eax]
mov byte [ecx], 0
lea ecx, [ecx + 1]
sub eax, 1
jne 0x409820
mov dword [0x42c730], eax
mov ecx, 0x42c734
mov eax, 0x190
nop word [eax + eax]
mov byte [ecx], 0
lea ecx, [ecx + 1]
sub eax, 1
jne 0x409840
mov dword [0x42c6c0], eax
call fcn.00406f00
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 1
push 0x5003b0
call fcn.0040ba5f
add esp, 8
mov dword [0x42c4f8], eax
lea eax, [esp + 0x46a8]
push eax
push pe_nt_image_headers32
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
cmp word [esp + 0x46a8], 0
lea esi, [esp + 0x46a8]
je 0x4098da
mov edi, dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
push esi
call edi
cmp eax, 3
je 0x4098b2
cmp eax, 2
je 0x4098b2
cmp eax, 4
jne 0x4098b9
mov ecx, esi
call fcn.00408fb0
mov ecx, esi
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4098c0
sub ecx, edx
sar ecx, 1
lea esi, [esi + ecx*2]
add esi, 2
cmp word [esi], ax
jne 0x4098a0
push str._nFiles_decrypted__n
call fcn.00408160
mov eax, dword [0x42c4f8]
add esp, 4
test eax, eax
je 0x4098f9
push eax
call fcn.0040ba6a
add esp, 4
mov eax, 0x118
mov ecx, 0x42c9c0
mov byte [ecx], 0
lea ecx, [ecx + 1]
sub eax, 1
jne 0x409903
mov eax, 0x140
mov ecx, 0x42c9a0
nop dword [eax + eax]
mov byte [ecx], 0
lea ecx, [ecx + 1]
sub eax, 1
jne 0x409920
mov eax, 0x6c
mov ecx, 0x42c6c4
mov byte [ecx], 0
lea ecx, [ecx + 1]
sub eax, 1
jne 0x409935
mov dword [0x42c730], eax
mov ecx, 0x42c734
mov eax, 0x190
nop
mov byte [ecx], 0
lea ecx, [ecx + 1]
sub eax, 1
jne 0x409950
mov dword [0x42c6c0], eax
call fcn.00406f00
push str.pause
call fcn.0040d00e
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret