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

Disassembly:
push 0x2a4
mov eax, 0x46cd3b
call fcn.004490ad
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x260]
mov esi, dword [ebp + 0x14]
and dword [ebp - 0x2b0], 0
push 0x473948
mov dword [ebp - 0x2a4], eax
mov dword [ebp - 0x294], esi
call fcn.00403e21
and dword [ebp - 4], 0
cmp byte [ebp + 0x18], 0
je 0x40e5bd
mov edi, 0x4783e8
push edi
call fcn.0040b332
pop ecx
push eax
push edi
lea ecx, [ebp - 0x260]
call fcn.00409577
lea ecx, [ebp - 0x2ac]
call fcn.0040dec2
lea ecx, [ebp - 0x2ac]
mov byte [ebp - 4], 1
call fcn.0040e9d2
mov ebx, dword [ebp + 0xc]
mov ecx, 0x8000
test al, al
je 0x40e813
cmp ebx, 8
ja case.default.0x40e5ec
jmp dword [ebx*4 + 0x40e98a]
mov esi, 0x48e510
jmp 0x40e629
mov esi, 0x48e520
jmp 0x40e629
mov esi, 0x48e4f0
jmp 0x40e629
mov esi, 0x48e4d0
jmp 0x40e629
mov esi, 0x48e530
jmp 0x40e629
mov esi, 0x48e4e0
jmp 0x40e629
mov esi, 0x48e4c0
jmp 0x40e629
mov esi, 0x48e500
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 0x40e813
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 0x40e80e
push dword [ebp - 0x2a0]
lea ecx, [ebp - 0x298]
call fcn.0040de74
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.0040df56
push 0x4783f0
lea ecx, [ebp - 0x298]
call fcn.0040df56
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 0x40e736
push 0
push dword [ebp - 0x298]
call edi
test eax, eax
jne 0x40e736
call esi
cmp eax, 0xb7
je 0x40e736
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.0040efce
add esp, 0x10
cmp dword [eax + 0x14], 0x10
mov byte [ebp - 4], 3
jb 0x40e70f
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x23c]
call fcn.0040487f
push 0x4939d8
lea eax, [ebp - 0x23c]
mov dword [ebp - method.std::bad_exception.virtual_0], vtable.std::runtime_error.0
push eax
call fcn.0044b5d4
mov eax, dword [ebp - 0x294]
test eax, eax
je 0x40e793
push eax
lea ecx, [ebp - 0x298]
call fcn.0040df56
test bl, bl
je 0x40e793
push 0
push dword [ebp - 0x298]
call edi
test eax, eax
jne 0x40e793
call esi
cmp eax, 0xb7
je 0x40e793
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.0040efce
add esp, 0x10
mov byte [ebp - 4], 4
cmp dword [eax + 0x14], 0x10
jb 0x40e70f
jmp 0x40e70d
push dword [ebp - 0x298]
lea ecx, [ebp - 0x29c]
call fcn.0040de74
lea ecx, [ebp - 0x29c]
mov byte [ebp - 4], 5
call fcn.0040df9c
push dword [ebp - 0x29c]
mov esi, dword [ebp - 0x2a4]
mov ecx, esi
call fcn.00403e9d
mov ecx, dword [ebp - 0x29c]
lea ecx, [ecx - 0x10]
call fcn.0040e40e
mov ecx, dword [ebp - 0x298]
lea ecx, [ecx - 0x10]
call fcn.0040e40e
cmp dword [ebp - 0x2a8], 0
je 0x40e7f7
push dword [ebp - 0x2a8]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 0
push 1
lea ecx, [ebp - 0x260]
call fcn.00409040
mov eax, esi
call fcn.00449057
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.0040ee00
pop ecx
pop ecx
mov byte [ebp - 4], 6
test esi, esi
je 0x40e895
push esi
lea ecx, [ebp - 0x230]
call fcn.00403e21
lea eax, [ebp - 0x230]
mov byte [ebp - 4], 7
push eax
lea eax, [ebp - 0x248]
push eax
call fcn.0040ee00
pop ecx
pop ecx
push 0xffffffffffffffff
xor esi, esi
mov byte [ebp - 4], 8
push esi
push eax
lea ecx, [ebp - 0x278]
call fcn.0040939e
push esi
push 1
lea ecx, [ebp - 0x248]
call fcn.00409095
push esi
push 1
lea ecx, [ebp - 0x230]
mov byte [ebp - 4], 6
call fcn.00409040
jmp 0x40e897
xor esi, esi
cmp ebx, 8
ja case.0x40e89c.7
jmp dword [ebx*4 + 0x40e9ae]
push 0x1c
pop ecx
jmp 0x40e8c6
push 0x23
jmp 0x40e8a5
push 2
jmp 0x40e8a5
push 0x17
jmp 0x40e8a5
push 0x26
jmp 0x40e8a5
mov ecx, esi
jmp 0x40e8c6
push 0x1a
jmp 0x40e8a5
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 0x40e96b
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x2a0]
call fcn.0040de74
push dword [ebp - 0x2a0]
lea ecx, [ebp - 0x29c]
mov byte [ebp - 4], 9
call fcn.0040de74
lea ecx, [ebp - 0x29c]
mov byte [ebp - 4], 0xa
call fcn.0040df9c
push dword [ebp - 0x29c]
mov esi, dword [ebp - 0x2a4]
mov ecx, esi
call fcn.00403e9d
mov ecx, dword [ebp - 0x29c]
lea ecx, [ecx - 0x10]
call fcn.0040e40e
mov ecx, dword [ebp - 0x2a0]
lea ecx, [ecx - 0x10]
call fcn.0040e40e
push 0
push 1
lea ecx, [ebp - 0x278]
call fcn.00409095
jmp 0x40e7e2
push eax
lea eax, [ebp - 0x290]
push str.Bad_result_from_SHGetFolderPathAndSubDirW_d
push eax
call fcn.0040efce
add esp, 0xc
mov byte [ebp - 4], 0xb
jmp 0x40e788