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

Disassembly:
push 0x2a4
mov eax, 0x46c9f5
call fcn.00448de7
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x260]
mov esi, dword [ebp + 0x14]
and dword [ebp - 0x2b0], 0
push 0x473970
mov dword [ebp - 0x2a4], eax
mov dword [ebp - 0x294], esi
call fcn.00403e06
and dword [ebp - 4], 0
cmp byte [ebp + 0x18], 0
je 0x40e6b9
mov edi, 0x4784b8
push edi
call fcn.0040b440
pop ecx
push eax
push edi
lea ecx, [ebp - 0x260]
call fcn.00409541
lea ecx, [ebp - 0x2ac]
call fcn.0040df9e
lea ecx, [ebp - 0x2ac]
mov byte [ebp - 4], 1
call fcn.0040eace
mov ebx, dword [ebp + 0xc]
mov ecx, 0x8000
test al, al
je 0x40e90f
cmp ebx, 8
ja case.default.0x40e6e8
jmp dword [ebx*4 + 0x40ea86]
mov esi, 0x48e350
jmp 0x40e725
mov esi, 0x48e360
jmp 0x40e725
mov esi, 0x48e330
jmp 0x40e725
mov esi, 0x48e310
jmp 0x40e725
mov esi, 0x48e370
jmp 0x40e725
mov esi, 0x48e320
jmp 0x40e725
mov esi, 0x48e300
jmp 0x40e725
mov esi, 0x48e340
lea edi, [ebp - 0x228]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, dword [ebp - 0x294]
and dword [ebp - 0x2a0], 0
cmp dword [ebp - 0x2ac], 0
je 0x40e90f
lea eax, [ebp - 0x2a0]
push eax
xor eax, eax
cmp byte [ebp + 0x10], al
push 0
cmovne eax, ecx
push eax
lea eax, [ebp - 0x228]
push eax
call dword [ebp - 0x2ac]
cmp eax, 0x80004001
je 0x40e90a
push dword [ebp - 0x2a0]
lea ecx, [ebp - 0x298]
call fcn.0040df50
cmp dword [ebp - 0x24c], 0x10
lea eax, [ebp - 0x260]
lea ecx, [ebp - 0x298]
mov byte [ebp - 4], 2
cmovae eax, dword [ebp - 0x260]
push eax
call fcn.0040e032
push 0x4784c0
lea ecx, [ebp - 0x298]
call fcn.0040e032
mov bl, byte [ebp + 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test bl, bl
je 0x40e832
push 0
push dword [ebp - 0x298]
call edi
test eax, eax
jne 0x40e832
call esi
cmp eax, 0xb7
je 0x40e832
call esi
push eax
push dword [ebp - 0x298]
lea eax, [ebp - 0x290]
push str.Failed_to_create_directory__S__error_d
push eax
call fcn.0040f0ca
add esp, 0x10
cmp dword [eax + 0x14], 0x10
mov byte [ebp - 4], 3
jb 0x40e80b
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x23c]
call fcn.00404864
push 0x493804
lea eax, [ebp - 0x23c]
mov dword [ebp - method.std::bad_alloc.virtual_0], vtable.std::runtime_error.0
push eax
call fcn.0044b334
mov eax, dword [ebp - 0x294]
test eax, eax
je 0x40e88f
push eax
lea ecx, [ebp - 0x298]
call fcn.0040e032
test bl, bl
je 0x40e88f
push 0
push dword [ebp - 0x298]
call edi
test eax, eax
jne 0x40e88f
call esi
cmp eax, 0xb7
je 0x40e88f
call esi
push eax
push dword [ebp - 0x298]
lea eax, [ebp - 0x290]
push str.Failed_to_create_subdirectory__S__error_d
push eax
call fcn.0040f0ca
add esp, 0x10
mov byte [ebp - 4], 4
cmp dword [eax + 0x14], 0x10
jb 0x40e80b
jmp 0x40e809
push dword [ebp - 0x298]
lea ecx, [ebp - 0x29c]
call fcn.0040df50
lea ecx, [ebp - 0x29c]
mov byte [ebp - 4], 5
call fcn.0040e078
push dword [ebp - 0x29c]
mov esi, dword [ebp - 0x2a4]
mov ecx, esi
call fcn.00403e82
mov ecx, dword [ebp - 0x29c]
lea ecx, [ecx - 0x10]
call fcn.0040e4ea
mov ecx, dword [ebp - 0x298]
lea ecx, [ecx - 0x10]
call fcn.0040e4ea
cmp dword [ebp - 0x2a8], 0
je 0x40e8f3
push dword [ebp - 0x2a8]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 0
push 1
lea ecx, [ebp - 0x260]
call fcn.0040900a
mov eax, esi
call fcn.00448d91
ret
mov ecx, 0x8000
lea eax, [ebp - 0x260]
xor edi, edi
cmp byte [ebp + 0x10], 0
push eax
lea eax, [ebp - 0x278]
cmovne edi, ecx
push eax
call fcn.0040eefc
pop ecx
pop ecx
mov byte [ebp - 4], 6
test esi, esi
je 0x40e991
push esi
lea ecx, [ebp - 0x230]
call fcn.00403e06
lea eax, [ebp - 0x230]
mov byte [ebp - 4], 7
push eax
lea eax, [ebp - 0x248]
push eax
call fcn.0040eefc
pop ecx
pop ecx
push 0xffffffffffffffff
xor esi, esi
mov byte [ebp - 4], 8
push esi
push eax
lea ecx, [ebp - 0x278]
call fcn.00409368
push esi
push 1
lea ecx, [ebp - 0x248]
call fcn.0040905f
push esi
push 1
lea ecx, [ebp - 0x230]
mov byte [ebp - 4], 6
call fcn.0040900a
jmp 0x40e993
xor esi, esi
cmp ebx, 8
ja case.0x40e998.7
jmp dword [ebx*4 + 0x40eaaa]
push 0x1c
pop ecx
jmp 0x40e9c2
push 0x23
jmp 0x40e9a1
push 2
jmp 0x40e9a1
push 0x17
jmp 0x40e9a1
push 0x26
jmp 0x40e9a1
mov ecx, esi
jmp 0x40e9c2
push 0x1a
jmp 0x40e9a1
mov ecx, dword [ebp - 0x2a4]
cmp dword [ebp - 0x264], 8
lea edx, [ebp - 0x218]
push edx
lea eax, [ebp - 0x278]
cmovae eax, dword [ebp - 0x278]
or ecx, edi
push eax
push esi
push esi
push ecx
push esi
call dword [sym.imp.SHELL32.dll_SHGetFolderPathAndSubDirW]
test eax, eax
jne 0x40ea67
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x2a0]
call fcn.0040df50
push dword [ebp - 0x2a0]
lea ecx, [ebp - 0x29c]
mov byte [ebp - 4], 9
call fcn.0040df50
lea ecx, [ebp - 0x29c]
mov byte [ebp - 4], 0xa
call fcn.0040e078
push dword [ebp - 0x29c]
mov esi, dword [ebp - 0x2a4]
mov ecx, esi
call fcn.00403e82
mov ecx, dword [ebp - 0x29c]
lea ecx, [ecx - 0x10]
call fcn.0040e4ea
mov ecx, dword [ebp - 0x2a0]
lea ecx, [ecx - 0x10]
call fcn.0040e4ea
push 0
push 1
lea ecx, [ebp - 0x278]
call fcn.0040905f
jmp 0x40e8de
push eax
lea eax, [ebp - 0x290]
push str.Bad_result_from_SHGetFolderPathAndSubDirW_d
push eax
call fcn.0040f0ca
add esp, 0xc
mov byte [ebp - 4], 0xb
jmp 0x40e884