Function at 0x401070
Capabilities:
Create directory
Create process on windows
Delete file
Get common file path
Move file

Disassembly:
sub esp, 0xa90
mov eax, dword [0x40f020]
xor eax, esp
mov dword [esp + 0xa8c], eax
push ebx
push esi
push edi
push eax
mov eax, 0x413ae0
pop eax
push 0x208
lea eax, [esp + 0x27c]
push 0
push eax
call fcn.004022c0
xor ecx, ecx
push 0x206
push ecx
lea edx, [esp + 0x86]
push edx
mov word [esp + 0x88], cx
call fcn.004022c0
xor eax, eax
push 0x206
push eax
lea ecx, [esp + 0x6aa]
push ecx
mov word [esp + 0x6ac], ax
call fcn.004022c0
push 0x208
lea edx, [esp + 0x4a8]
push 0
push edx
call fcn.004022c0
xor eax, eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
add esp, 0x30
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov ecx, dword [esp + 0x14]
push ecx
call fcn.00401cec
call fcn.00401cfe
push eax
push 0x40db3c
mov ecx, 0x104
lea ebx, [esp + 0x48c]
call fcn.004018d0
add esp, 0xc
lea edx, [esp + 0x70]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov eax, ebx
push eax
lea ecx, [esp + 0x74]
push ecx
push str._s_s.tmp
mov ecx, 0x104
lea ebx, [esp + 0x694]
call fcn.004018d0
add esp, 0xc
mov edx, ebx
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov esi, dword [sym.imp.KERNEL32.dll_MoveFileExW]
push 4
push 0
mov eax, ebx
push eax
call esi
push 0x104
lea ecx, [esp + 0x27c]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 4
push 0
lea edx, [esp + 0x280]
push edx
call esi
mov eax, ebx
push eax
lea ecx, [esp + 0x27c]
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileW]
lea edx, [esp + 0x278]
push edx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [esp + 0xc]
push eax
lea ecx, [esp + 0x27c]
call fcn.00401380
mov edi, dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea ecx, [esp + 0x480]
push ecx
lea edx, [esp + 0x74]
push edx
call edi
push 0
lea eax, [esp + 0x74]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x401337
lea ecx, [esp + 0x10]
push ecx
lea ecx, [esp + 0x74]
call fcn.00401380
call fcn.00401cfe
push eax
push str._d.exe
mov ecx, 0x104
lea ebx, [esp + 0x488]
call fcn.004018d0
add esp, 8
mov edx, ebx
push edx
lea eax, [esp + 0x74]
push eax
call edi
push 4
push 0
lea ecx, [esp + 0x78]
push ecx
call esi
mov edx, dword [esp + 0x10]
push 4
push 0
push edx
call esi
mov eax, dword [esp + 0xc]
push 4
push 0
push eax
call esi
push 0x40
lea ecx, [esp + 0x34]
push 0
push ecx
call fcn.004022c0
xor eax, eax
push 0x208
push eax
lea edx, [esp + 0x8a4]
push edx
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], 0x44
call fcn.004022c0
lea eax, [esp + 0x88]
push eax
push str.__s_
mov ecx, 0x104
lea ebx, [esp + 0x8b0]
call fcn.004018d0
lea ecx, [esp + 0x90]
push ecx
call fcn.00401000
add esp, 0x24
test eax, eax
jne 0x4012d6
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x40132b
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x30]
push edx
push 0
push 0
push 0x8000000
push 1
push 0
push 0
lea eax, [esp + 0x8b0]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x401317
mov ecx, dword [esp + 0x1c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call esi
mov edx, dword [esp + 0x20]
push edx
call esi
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401337
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0xc]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401357
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0xa98]
pop edi
pop esi
pop ebx
xor ecx, esp
xor eax, eax
call fcn.00401cdd
add esp, 0xa90
ret 0x10