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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x453bf1
mov eax, dword fs:[0]
push eax
mov eax, 0x2298
call fcn.00442810
mov eax, dword [0x468100]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x22a4], eax
mov eax, dword [ebp + 0xc]
xor edi, edi
mov dword [ebp - 0x22a0], eax
cmp eax, edi
je 0x401295
lea ecx, [ebp - 0x244]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
cmp eax, 0x104
jae 0x401295
cmp eax, edi
je 0x401295
push edi
call fcn.0043e833
push eax
call fcn.0043e681
add esp, 8
mov dword [ebp - 0x229c], edi
mov ebx, 7
xor edx, edx
mov dword [ebp - 0x2268], ebx
mov dword [ebp - 0x226c], edi
mov word [ebp - 0x227c], dx
mov eax, dword [ebp - 0x22a4]
push edi
push eax
or eax, 0xffffffff
lea ecx, [ebp - 0x227c]
mov dword [ebp - 4], edi
call fcn.00401690
xor eax, eax
push 0xa
lea edx, [ebp - 0x38]
xor ecx, ecx
push 0x14
push edx
mov word [ebp - 0x38], cx
mov dword [ebp - 0x36], eax
mov dword [ebp - 0x32], eax
mov dword [ebp - 0x2e], eax
mov dword [ebp - 0x2a], eax
mov dword [ebp - 0x26], eax
mov dword [ebp - 0x22], eax
mov dword [ebp - 0x1e], eax
mov dword [ebp - 0x1a], eax
mov dword [ebp - 0x16], eax
mov word [ebp - 0x12], ax
call fcn.0043e693
cdq
mov ecx, 0x7fff
idiv ecx
push edx
call fcn.0043e793
lea eax, [ebp - 0x38]
add esp, 0x10
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x401146
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x38]
lea ecx, [ebp - 0x227c]
call fcn.00401560
xor edx, edx
lea eax, [ebp - 0x244]
mov word [ebp - 0x2298], dx
mov dword [ebp - 0x2284], ebx
mov dword [ebp - 0x2288], edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x401182
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x244]
lea esi, [ebp - 0x2298]
call fcn.004017a0
push edi
lea eax, [ebp - 0x227c]
push eax
or eax, 0xffffffff
mov byte [ebp - 4], 1
call fcn.00401470
xor ecx, ecx
push edi
mov word [ebp - 0x2260], cx
push eax
or eax, 0xffffffff
lea ecx, [ebp - 0x2260]
mov dword [ebp - 0x224c], ebx
mov dword [ebp - 0x2250], edi
call fcn.00401690
mov esi, 8
mov byte [ebp - 4], 3
cmp dword [ebp - 0x2284], esi
jb 0x4011fc
mov edx, dword [ebp - 0x2298]
push edx
call fcn.0043e7d7
add esp, 4
xor eax, eax
mov word [ebp - 0x2298], ax
mov eax, dword [ebp - 0x2260]
mov dword [ebp - 0x2284], ebx
mov dword [ebp - 0x2288], edi
cmp dword [ebp - 0x224c], esi
jae 0x401225
lea eax, [ebp - 0x2260]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x4012b3
cmp dword [ebp - 0x224c], esi
jb 0x40124c
mov ecx, dword [ebp - 0x2260]
push ecx
call fcn.0043e7d7
add esp, 4
xor edx, edx
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x224c], ebx
mov dword [ebp - 0x2250], edi
mov word [ebp - 0x2260], dx
cmp dword [ebp - 0x2268], esi
jb 0x40127f
mov eax, dword [ebp - 0x227c]
push eax
call fcn.0043e7d7
add esp, 4
mov eax, dword [ebp - 0x229c]
inc eax
mov dword [ebp - 0x229c], eax
cmp eax, 0x32
jl 0x4010cd
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0043e1c4
mov esp, ebp
pop ebp
ret
push 0x1ffe
lea edx, [ebp - 0x2242]
xor ecx, ecx
push edi
push edx
mov word [ebp - 0x2244], cx
call fcn.00442420
mov eax, dword [ebp - 0x2260]
add esp, 0xc
cmp dword [ebp - 0x224c], esi
jae 0x4012e5
lea eax, [ebp - 0x2260]
push 0x1000
lea ecx, [ebp - 0x2244]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
test eax, eax
jne 0x401348
cmp dword [ebp - 0x224c], esi
jb 0x401313
mov edx, dword [ebp - 0x2260]
push edx
call fcn.0043e7d7
add esp, 4
xor eax, eax
mov dword [ebp - 0x224c], ebx
mov dword [ebp - 0x2250], edi
mov word [ebp - 0x2260], ax
cmp dword [ebp - 0x2268], esi
jb 0x401295
mov ecx, dword [ebp - 0x227c]
push ecx
call fcn.0043e7d7
add esp, 4
jmp 0x401295
lea eax, [ebp - 0x2244]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x401351
mov esi, dword [ebp - 0x22a0]
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x2244]
call fcn.004017a0
mov esi, 8
cmp dword [ebp - 0x224c], esi
jb 0x40138e
mov edx, dword [ebp - 0x2260]
push edx
call fcn.0043e7d7
add esp, 4
xor eax, eax
mov dword [ebp - 0x224c], ebx
mov dword [ebp - 0x2250], edi
mov word [ebp - 0x2260], ax
cmp dword [ebp - 0x2268], esi
jb 0x4013ba
mov ecx, dword [ebp - 0x227c]
push ecx
call fcn.0043e7d7
add esp, 4
mov al, 1
jmp 0x401297