Function at 0x40e480
Capabilities:
Get common file path
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x466f38
mov eax, dword fs:[0]
push eax
sub esp, 0x298
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x290], eax
push ebx
push esi
push edi
mov eax, dword [section..data]
xor eax, esp
push eax
lea eax, [esp + 0x2a8]
mov dword fs:[0], eax
mov ebx, edx
mov esi, ecx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x18]
mov edi, dword [ebp + 0x10]
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0x14]
push eax
lea eax, [esp + 0x50]
mov dword [esp + 0x18], ecx
push eax
call fcn.00435c40
add esp, 8
mov dword [esp + 0x2b0], 0
mov ecx, dword [esp + 0x5c]
test ecx, ecx
je 0x40e526
cmp dword [esp + 0x60], 8
lea eax, [esp + 0x4c]
cmovae eax, dword [esp + 0x4c]
cmp word [eax + ecx*2 - 2], 0x5c
je 0x40e526
push 1
push 0x4722b4
lea ecx, [esp + 0x54]
call fcn.004113f0
lea eax, [esp + 0x34]
push esi
push eax
call fcn.00435c40
add esp, 8
push 0xffffffffffffffff
push 0
push eax
lea ecx, [esp + 0x58]
mov byte [esp + 0x2bc], 1
call fcn.00411320
mov byte [esp + 0x2b0], 0
cmp dword [esp + 0x48], 8
jb 0x40e565
push dword [esp + 0x34]
call fcn.004396bb
add esp, 4
lea eax, [esp + 0x7c]
push ebx
push eax
call fcn.00435c40
add esp, 8
xor eax, eax
mov byte [esp + 0x2b0], 2
push eax
push 0x4722a0
lea ecx, [esp + 0x3c]
mov dword [esp + 0x50], 7
mov dword [esp + 0x4c], 0
mov word [esp + 0x3c], ax
call fcn.00404440
mov byte [esp + 0x2b0], 3
lea eax, [esp + 0x34]
cmp dword [esp + 0x48], 8
push dword [esp + 0x44]
cmovae eax, dword [esp + 0x38]
push eax
push dword [esp + 0x94]
push ecx
lea ecx, [esp + 0x8c]
call fcn.00411c40
test eax, eax
mov byte [esp + 0x2b0], 2
setne bl
cmp dword [esp + 0x48], 8
jb 0x40e5f0
push dword [esp + 0x34]
call fcn.004396bb
add esp, 4
test bl, bl
je 0x40e633
cmp dword [esp + 0x60], 8
lea ecx, [esp + 0x4c]
mov eax, dword [esp + 0x5c]
cmovae ecx, dword [esp + 0x4c]
cmp word [ecx + eax*2 - 2], 0x5c
je 0x40e61e
push 1
push 0x4722b4
lea ecx, [esp + 0x54]
call fcn.004113f0
push 0xffffffffffffffff
push 0
lea eax, [esp + 0x84]
push eax
lea ecx, [esp + 0x58]
call fcn.00411320
push dword [esp + 0x18]
lea eax, [esp + 0x68]
push eax
call fcn.00435c40
add esp, 8
xor eax, eax
mov dword [esp + 0x30], 7
mov dword [esp + 0x2c], 0
mov word [esp + 0x1c], ax
mov byte [esp + 0x2b0], 5
mov ecx, 0x473b0c
mov eax, edi
lea ebx, [ebx]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40e690
test dl, dl
je 0x40e68c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40e690
add eax, 2
add ecx, 2
test dl, dl
jne 0x40e670
xor eax, eax
jmp 0x40e695
sbb eax, eax
or eax, 1
test eax, eax
jne 0x40e790
lea eax, [esp + 0x94]
push eax
push 0
push 0
push 0x17
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
cmp word [esp + 0x94], 0
jne 0x40e6c2
xor ecx, ecx
jmp 0x40e6df
lea ecx, [esp + 0x94]
lea edx, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40e6d0
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [esp + 0x98]
push eax
lea ecx, [esp + 0x24]
call fcn.00404440
push 1
push 0x4722b4
lea ecx, [esp + 0x24]
call fcn.004113f0
push dword [esp + 0x14]
lea eax, [esp + 0x38]
push eax
call fcn.00435c40
add esp, 8
push 0xffffffffffffffff
push 0
push eax
lea ecx, [esp + 0x28]
mov byte [esp + 0x2bc], 6
call fcn.00411320
mov byte [esp + 0x2b0], 5
cmp dword [esp + 0x48], 8
jb 0x40e743
push dword [esp + 0x34]
call fcn.004396bb
add esp, 4
cmp dword [esp + 0x30], 8
lea eax, [esp + 0x1c]
cmovae eax, dword [esp + 0x1c]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
mov edx, dword [0x493b38]
test edx, edx
je 0x40e8f0
cmp dword [esp + 0x30], 8
lea ecx, [esp + 0x1c]
lea eax, [esp + 0x64]
cmovae ecx, dword [esp + 0x1c]
cmp dword [esp + 0x78], 8
push ecx
cmovae eax, dword [esp + 0x68]
push eax
push 0x473b20
jmp 0x40e8e7
mov ecx, 0x473b74
mov eax, edi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40e7b7
test dl, dl
je 0x40e7b3
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40e7b7
add eax, 2
add ecx, 2
test dl, dl
jne 0x40e797
xor eax, eax
jmp 0x40e7bc
sbb eax, eax
or eax, 1
test eax, eax
jne 0x40e844
lea eax, [esp + 0x94]
push eax
push 0
push 0
push 0x19
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
cmp word [esp + 0x94], 0
jne 0x40e7e9
xor ecx, ecx
jmp 0x40e802
lea ecx, [esp + 0x94]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40e7f3
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [esp + 0x98]
push eax
lea ecx, [esp + 0x24]
call fcn.00404440
mov ecx, dword [0x493b38]
test ecx, ecx
je 0x40e8f0
cmp dword [esp + 0x30], 8
lea eax, [esp + 0x1c]
cmovae eax, dword [esp + 0x1c]
push eax
push 0x473b80
push ecx
call fcn.00438330
add esp, 0xc
jmp 0x40e8f0
lea eax, [esp + 0x34]
push edi
push eax
call fcn.00435c40
mov esi, eax
add esp, 8
lea eax, [esp + 0x1c]
cmp eax, esi
je 0x40e890
cmp dword [esp + 0x30], 8
jb 0x40e86f
push dword [esp + 0x1c]
call fcn.004396bb
add esp, 4
xor eax, eax
mov dword [esp + 0x30], 7
push esi
lea ecx, [esp + 0x20]
mov dword [esp + 0x30], 0
mov word [esp + 0x20], ax
call fcn.00403e80
cmp dword [esp + 0x48], 8
jb 0x40e8a3
push dword [esp + 0x34]
call fcn.004396bb
add esp, 4
mov edx, dword [0x493b38]
xor eax, eax
mov dword [esp + 0x48], 7
mov dword [esp + 0x44], 0
mov word [esp + 0x34], ax
test edx, edx
je 0x40e8f0
cmp dword [esp + 0x30], 8
lea ecx, [esp + 0x1c]
lea eax, [esp + 0x64]
cmovae ecx, dword [esp + 0x1c]
cmp dword [esp + 0x78], 8
push ecx
cmovae eax, dword [esp + 0x68]
push eax
push 0x473bc4
push edx
call fcn.00438330
add esp, 0x10
push 1
push 0x4722b4
lea ecx, [esp + 0x24]
call fcn.004113f0
push 0xffffffffffffffff
push 0
lea eax, [esp + 0x6c]
push eax
lea ecx, [esp + 0x28]
call fcn.00411320
push 4
push 0x473c00
lea ecx, [esp + 0x24]
call fcn.004113f0
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40e9df
push eax
lea eax, [esp + 0x38]
push eax
call fcn.00435c40
mov byte [esp + 0x2b8], 7
lea edx, [esp + 0x3c]
cmp dword [esp + 0x50], 8
lea ecx, [esp + 0x24]
lea eax, [esp + 0x54]
cmovae edx, dword [esp + 0x3c]
cmp dword [esp + 0x38], 8
push edx
cmovae ecx, dword [esp + 0x28]
cmp dword [esp + 0x6c], 8
push ecx
cmovae eax, dword [esp + 0x5c]
push eax
call fcn.00433500
mov edx, dword [0x493b38]
add esp, 0x14
mov bl, al
test edx, edx
je 0x40e9a5
cmp dword [esp + 0x48], 8
lea ecx, [esp + 0x34]
cmovae ecx, dword [esp + 0x34]
push ecx
push 0x473c0c
push edx
call fcn.00438330
mov edx, dword [0x493b38]
add esp, 0xc
mov byte [esp + 0x2b0], 5
cmp dword [esp + 0x48], 8
jb 0x40e9c6
push dword [esp + 0x34]
call fcn.004396bb
mov edx, dword [0x493b38]
add esp, 4
xor eax, eax
mov dword [esp + 0x48], 7
mov dword [esp + 0x44], 0
mov word [esp + 0x34], ax
jmp 0x40ea26
cmp dword [esp + 0x30], 8
lea ecx, [esp + 0x1c]
push 0
cmovae ecx, dword [esp + 0x20]
lea eax, [esp + 0x50]
cmp dword [esp + 0x64], 8
push ecx
cmovae eax, dword [esp + 0x54]
push eax
call fcn.00433500
mov bl, al
add esp, 0xc
mov eax, dword [0x493b38]
test eax, eax
je 0x40ea5d
push 0x473c30
push eax
call fcn.00438330
mov edx, dword [0x493b38]
add esp, 8
test edx, edx
je 0x40ea5d
lea eax, [esp + 0x1c]
test bl, bl
je 0x40ea44
cmp dword [esp + 0x30], 8
cmovae eax, dword [esp + 0x1c]
push eax
push 0x473c58
jmp 0x40ea54
cmp dword [esp + 0x30], 8
cmovae eax, dword [esp + 0x1c]
push eax
push 0x473ca8
push edx
call fcn.00438330
add esp, 0xc
cmp dword [esp + 0x30], 8
jb 0x40ea70
push dword [esp + 0x1c]
call fcn.004396bb
add esp, 4
xor eax, eax
mov dword [esp + 0x30], 7
cmp dword [esp + 0x78], 8
mov dword [esp + 0x2c], 0
mov word [esp + 0x1c], ax
jb 0x40ea9a
push dword [esp + 0x64]
call fcn.004396bb
add esp, 4
xor eax, eax
mov dword [esp + 0x78], 7
cmp dword [esp + 0x90], 8
mov dword [esp + 0x74], 0
mov word [esp + 0x64], ax
jb 0x40eac7
push dword [esp + 0x7c]
call fcn.004396bb
add esp, 4
xor eax, eax
mov dword [esp + 0x90], 7
cmp dword [esp + 0x60], 8
mov dword [esp + 0x8c], 0
mov word [esp + 0x7c], ax
jb 0x40eaf7
push dword [esp + 0x4c]
call fcn.004396bb
add esp, 4
mov al, bl
mov ecx, dword [esp + 0x2a8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x290]
xor ecx, esp
call fcn.00438e07
mov esp, ebp
pop ebp
ret