Function at 0x402050
Capabilities:
Get common file path
Write file on windows

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4172f0
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x250
mov eax, dword [0x420004]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xorps xmm0, xmm0
mov dword [ebp - 0x224], 0
xor eax, eax
movq qword [ebp - 0x22c], xmm0
xor edx, edx
mov dword [ebp - 0x244], eax
xor edi, edi
mov dword [ebp - 0x22c], eax
mov dword [ebp - 0x228], edi
mov dword [ebp - 0x240], edx
mov dword [ebp - 0x224], edx
lea esi, [ecx + 4]
mov dword [ebp - 4], edx
mov eax, dword [esi]
mov ecx, dword [esi + 4]
add esi, 8
mov dword [ebp - 0x23c], edx
mov dword [ebp - 0x234], eax
mov dword [ebp - 0x250], ecx
test eax, eax
je 0x402181
mov eax, esi
mov dword [ebp - 0x260], esi
lea ecx, [eax + 2]
mov dword [ebp - 0x240], ecx
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x402103
sub eax, dword [ebp - 0x240]
sar eax, 1
lea esi, [esi + eax*2]
mov eax, dword [esi + 2]
mov dword [ebp - 0x258], eax
mov eax, dword [esi + 6]
add esi, 0xa
mov dword [ebp - 0x254], eax
cmp edi, edx
je 0x402147
movups xmm0, xmmword [ebp - 0x260]
movups xmmword [edi], xmm0
add edi, 0x10
mov dword [ebp - 0x228], edi
jmp 0x402166
lea eax, [ebp - 0x260]
push eax
push edi
lea ecx, [ebp - 0x22c]
call fcn.00402650
mov edx, dword [ebp - 0x224]
mov edi, dword [ebp - 0x228]
sub dword [ebp - 0x234], 1
jne 0x4020f2
mov eax, dword [ebp - 0x22c]
mov dword [ebp - 0x240], edx
mov dword [ebp - 0x244], eax
lea eax, [ebp - 0x220]
push eax
push 0
push 0
push 0x23
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
push str.ForensiTMigrate
lea eax, [ebp - 0x220]
push 0x104
push eax
call fcn.00408521
add esp, 0xc
lea eax, [ebp - 0x220]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
push 0xfffe
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, eax
mov dword [ebp - 0x248], 0
mov eax, dword [ebp - 0x244]
sub edi, eax
sar edi, 4
mov dword [ebp - 0x238], ecx
test edi, edi
je 0x4022c3
add eax, 8
mov dword [ebp - 0x234], eax
push dword [eax - 8]
lea eax, [ebp - 0x220]
push eax
push str._ws_ws
push 0x7fff
push ecx
call fcn.00401600
add esp, 0x14
push 0
push 0
push 2
push 0
push 1
push 0x10000000
push dword [ebp - 0x238]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ecx, eax
mov dword [ebp - 0x24c], ecx
cmp ecx, 0xffffffff
je 0x40227c
push 0
lea eax, [ebp - 0x230]
push eax
mov eax, dword [ebp - 0x234]
push dword [eax]
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40226e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x23c], eax
push dword [ebp - 0x24c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x402288
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x23c], eax
mov eax, dword [ebp - 0x234]
add esi, dword [eax]
cmp dword [ebp - 0x23c], 0
jne 0x4022bd
mov ecx, dword [ebp - 0x248]
add eax, 0x10
inc ecx
mov dword [ebp - 0x234], eax
mov dword [ebp - 0x248], ecx
cmp ecx, edi
mov ecx, dword [ebp - 0x238]
jb 0x402200
mov ecx, dword [ebp - 0x238]
mov eax, dword [ebp - 0x250]
mov esi, dword [ebp - 0x244]
add eax, eax
push dword [esi + eax*8]
lea eax, [ebp - 0x220]
push eax
push str._ws_ws
push 0x7fff
push ecx
call fcn.00401600
mov edi, dword [ebp - 0x238]
add esp, 0x14
mov ecx, edi
call fcn.00402370
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
test esi, esi
je 0x40233e
mov ecx, dword [ebp - 0x240]
mov eax, esi
sub ecx, esi
and ecx, 0xfffffff0
cmp ecx, 0x1000
jb 0x402334
mov esi, dword [esi - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402362
push ecx
push esi
call fcn.004029ac
add esp, 8
mov eax, dword [ebp - 0x23c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0040296b
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.004087de
int3