Function at 0x402010
Capabilities:
Create directory
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x88c
mov eax, dword [0x40d004]
xor eax, esp
mov dword [esp + 0x888], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0x10]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_FindClose]
mov dword [esp + 0x10], eax
test eax, eax
jne 0x4020df
lea ecx, [esp + 0x480]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov edx, 0x104
lea eax, [esp + 0x480]
mov edi, edi
cmp word [eax], 0
je 0x40207e
add eax, 2
dec edx
jne 0x402070
jmp 0x4020a6
test edx, edx
je 0x4020a6
mov ecx, 0x104
sub ecx, edx
mov eax, 0x104
sub eax, ecx
push 0x40ba00
lea ecx, [esp + ecx*2 + 0x484]
mov edx, 0x7fffffff
call fcn.004010e0
lea edx, [esp + 0x230]
push edx
lea eax, [esp + 0x484]
push eax
call esi
cmp eax, 0xffffffff
je 0x4020c2
push eax
call edi
jmp 0x4020d2
push 0
lea ecx, [esp + 0x484]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea edx, [esp + 0x480]
mov dword [esp + 0x10], edx
mov eax, edx
lea ecx, [esp + 0x230]
push ecx
push eax
call esi
cmp eax, 0xffffffff
je 0x4021c7
push eax
call edi
push 0x104
lea edx, [esp + 0x68c]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [esp + 0x230]
push eax
lea ecx, [esp + 0x68c]
push ecx
call esi
cmp eax, 0xffffffff
je 0x402138
lea edx, [esp + 0x18]
test edx, edx
je 0x402135
mov ecx, dword [esp + 0x250]
mov dword [esp + 0x18], ecx
push eax
call edi
mov ecx, dword [ebp + 8]
mov esi, ecx
imul esi, esi, 0x20c
xor edi, edi
xor ebx, ebx
add esi, 0xc
xor edx, edx
cmp ecx, 2
jl 0x402173
mov eax, dword [esp + 0x14]
add ecx, 0xfffffffe
shr ecx, 1
inc ecx
lea edx, [ecx + ecx]
mov edi, edi
add edi, dword [eax]
add ebx, dword [eax + 0x20c]
add eax, 0x418
dec ecx
jne 0x402160
mov ecx, dword [ebp + 8]
cmp edx, ecx
jae 0x402184
mov eax, dword [esp + 0x14]
imul edx, edx, 0x20c
add esi, dword [edx + eax]
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
lea ecx, [esp + 0x6a0]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esp + 0x1c], eax
cmp eax, 0xffffffff
jne 0x4021e1
mov eax, 0x7d1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x888]
xor ecx, esp
call fcn.00402b12
mov esp, ebp
pop ebp
ret
mov eax, 0x7d0
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x888]
xor ecx, esp
call fcn.00402b12
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x18]
mov edx, dword [str.p.exe]
mov ecx, dword [0x40ba20]
sub eax, edi
sub eax, ebx
sub eax, esi
push 0x1fc
mov dword [esp + 0x28], edx
mov dword [esp + 0x24], eax
mov eax, dword [0x40ba1c]
lea edx, [esp + 0x34]
push 0
push edx
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], ecx
call fcn.004064d0
mov eax, dword [esp + 0x1c]
mov ebx, dword [esp + 0x28]
push eax
push ebx
lea edi, [esp + 0x34]
call fcn.00401ed0
add esp, 0x14
test eax, eax
jne 0x402258
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x7d2
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x888]
xor ecx, esp
call fcn.00402b12
mov esp, ebp
pop ebp
ret
xor esi, esi
cmp dword [ebp + 8], esi
jbe 0x402281
mov edi, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
push ecx
push ebx
call fcn.00401ed0
add esp, 8
test eax, eax
je 0x4022b8
inc esi
add edi, 0x20c
cmp esi, dword [ebp + 8]
jb 0x402263
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [0x40ddb0], 0
je 0x4022a1
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
add ecx, 4
call fcn.00401d20
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x888]
xor ecx, esp
call fcn.00402b12
mov esp, ebp
pop ebp
ret
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x894]
pop edi
lea eax, [esi + 0x7d3]
pop esi
pop ebx
xor ecx, esp
call fcn.00402b12
mov esp, ebp
pop ebp
ret