Function at 0x402720
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4ea2e1
mov eax, dword fs:[0]
push eax
sub esp, 0x3b0
mov eax, dword [0x53450c]
xor eax, esp
mov dword [esp + 0x3a8], eax
push ebx
push esi
push edi
mov eax, dword [0x53450c]
xor eax, esp
push eax
lea eax, [esp + 0x3c0]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 0x10]
xor edi, edi
mov ebx, ecx
mov dword [esp + 0x30], edi
cmp byte [ebx + 4], 0
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], eax
jne 0x402827
cmp eax, edi
jne 0x40281a
push 3
push 0x518248
lea ecx, [esp + 0xf4]
mov dword [esp + 0x108], 0xf
mov dword [esp + 0x104], edi
mov byte [esp + 0xf4], 0
call fcn.004013e0
lea eax, [esp + 0xec]
push eax
lea ecx, [esp + 0x24]
push ecx
mov dword [esp + 0x3d0], edi
call fcn.00409e30
add esp, 8
push eax
lea ecx, [ebx + 8]
mov byte [esp + 0x3cc], 1
call fcn.00452230
lea ecx, [esp + 0x20]
mov byte [esp + 0x3c8], 0
call fcn.00451d40
mov dword [esp + 0x3c8], 0xffffffff
cmp dword [esp + 0x100], 0x10
jb 0x402823
mov edx, dword [esp + 0xec]
push edx
call fcn.0045e266
add esp, 4
jmp 0x402823
push eax
lea ecx, [ebx + 8]
call fcn.00452230
mov byte [ebx + 4], 1
cmp dword [0x5398b4], edi
jne 0x403366
xor eax, eax
mov dword [esp + 0xe4], 7
mov dword [esp + 0xe0], edi
mov word [esp + 0xd0], ax
mov dword [esp + 0x3c8], 2
cmp esi, edi
jne 0x402a0f
push 0x104
lea ecx, [esp + 0x1b0]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x402983
push 0x9c40
lea ecx, [ebx + 8]
call fcn.00451de0
test al, al
je 0x40295f
push 1
push 2
lea ecx, [esp + 0x3c]
call fcn.00403e50
lea edx, [esp + 0x34]
push 0x51824c
push edx
mov byte [esp + 0x3d0], 3
call fcn.00407000
add esp, 8
lea eax, [esp + 0xec]
push eax
lea ecx, [esp + 0x38]
call fcn.00403f50
push 0x69
push str.DEL.cpp
push eax
push 0x9c40
lea ecx, [ebx + 8]
mov byte [esp + 0x3d8], 4
call fcn.00451df0
cmp dword [esp + 0x100], 0x10
jb 0x402902
mov ecx, dword [esp + 0xec]
push ecx
call fcn.0045e266
add esp, 4
mov eax, dword [esp + 0x34]
mov ecx, dword [eax + 4]
lea edx, [esp + 0x84]
mov dword [esp + 0x18], edx
mov dword [esp + ecx + 0x34], vtable.std::basic_ostringstream_char__struct_std::char_traits_char___class_std::allocator_char__.0
lea ecx, [esp + 0x38]
mov byte [esp + 0x3c8], 5
call fcn.00403f80
mov byte [esp + 0x3c8], 2
mov edx, dword [esp + 0x34]
mov eax, dword [edx + 4]
lea ecx, [esp + 0x84]
mov dword [esp + eax + 0x34], vtable.std::basic_ostream_char__struct_std::char_traits_char__.0
push ecx
mov dword [esp + 0x88], vtable.std::ios_base.0
call fcn.0044ec40
add esp, 4
cmp dword [esp + 0xe4], 8
jb 0x402979
mov edx, dword [esp + 0xd0]
push edx
call fcn.0045e266
add esp, 4
mov eax, 2
jmp 0x40336d
cmp dword [esp + 0xe4], 8
mov eax, dword [esp + 0xd0]
mov dword [esp + 0xe0], edi
jae 0x4029a2
lea eax, [esp + 0xd0]
xor ecx, ecx
lea edx, [esp + 0x1ac]
mov word [eax], cx
push edx
lea ecx, [esp + 0xd4]
call fcn.00406bb0
lea esi, [esp + 0xec]
lea ecx, [esp + 0xd0]
call fcn.00403e10
push 0xffffffffffffffff
push edi
push eax
lea ecx, [esp + 0xdc]
mov byte [esp + 0x3d4], 6
call fcn.004012d0
mov byte [esp + 0x3c8], 2
cmp dword [esp + 0x100], 8
jb 0x402a08
mov eax, dword [esp + 0xec]
push eax
call fcn.0045e266
add esp, 4
push 0x518230
jmp 0x402a21
xor ecx, ecx
mov dword [esp + 0xe0], edi
mov word [esp + 0xd0], cx
push esi
lea ecx, [esp + 0xd4]
call fcn.00406bb0
lea edi, [ebx + 8]
push 0x2710
mov ecx, edi
mov dword [esp + 0x30], edi
call fcn.00451de0
test al, al
je 0x402da1
mov dword [esp + 0x34], 0x4ed0a8
mov byte [esp + 0x3c8], 7
lea ecx, [esp + 0x84]
mov dword [esp + 0x30], 1
mov dword [esp + 0x84], vtable.std::basic_ostream_char__struct_std::char_traits_char__.0
call fcn.00402380
lea eax, [esp + 0x28]
lea edx, [esp + 0x38]
push eax
lea ecx, [esp + 0x88]
mov dword [esp + 0xc0], edx
mov dword [esp + 0xc4], 0
call fcn.00402340
push eax
mov dword [esp + 0x3cc], 9
call fcn.00406a70
mov byte [esp + 0x3cc], 8
mov edi, dword [esp + 0x2c]
add esp, 4
mov ebx, eax
test edi, edi
je 0x402aff
push 0
lea ecx, [esp + 0x24]
call fcn.0044e6ed
mov eax, dword [edi + 4]
test eax, eax
je 0x402adf
cmp eax, 0xffffffff
jae 0x402adf
dec eax
mov dword [edi + 4], eax
mov esi, dword [edi + 4]
neg esi
sbb esi, esi
lea ecx, [esp + 0x20]
not esi
call fcn.0044e715
and esi, edi
je 0x402aff
mov edx, dword [esi]
mov eax, dword [edx]
push 1
mov ecx, esi
call eax
mov edx, dword [ebx]
mov eax, dword [edx + 0x18]
push 0x20
mov ecx, ebx
call eax
cmp dword [esp + 0xbc], 0
mov byte [esp + 0xc4], al
jne 0x402b34
mov eax, dword [esp + 0x90]
or eax, 4
push 0
push eax
lea ecx, [esp + 0x8c]
call fcn.00402240
mov dword [esp + 0x3c8], 0xa
mov ecx, dword [esp + 0x34]
mov edx, dword [ecx + 4]
mov edi, vtable.std::basic_ostringstream_char__struct_std::char_traits_char___class_std::allocator_char__.0
lea ecx, [esp + 0x38]
mov dword [esp + edx + 0x34], edi
call fcn.00405930
mov dword [esp + 0x38], vtable.std::basic_stringbuf_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov dword [esp + 0x74], 0
mov dword [esp + 0x78], 4
mov bl, 0xc
lea esi, [esp + 0xec]
lea ecx, [esp + 0xd0]
mov byte [esp + 0x3c8], bl
call fcn.00403e30
mov esi, 8
mov byte [esp + 0x3c8], 0xd
cmp dword [eax + 0x14], esi
jb 0x402ba0
mov eax, dword [eax]
lea ecx, [esp + 0x128]
push 3
mov dword [esp + 0x128], ecx
push eax
lea ecx, [esp + 0x12c]
call fcn.00404a40
mov byte [esp + 0x3c8], 0xe
mov edx, dword [esp + 0x124]
push edx
push ecx
lea eax, [esp + 0x3c]
push str.DllPath:
push eax
call fcn.00407000
add esp, 0xc
push eax
call fcn.00407000
mov eax, dword [esp + 0x12c]
lea ecx, [esp + 0x130]
add esp, 8
cmp eax, ecx
je 0x402c04
push eax
call fcn.0045ec5a
add esp, 4
mov byte [esp + 0x3c8], bl
cmp dword [esp + 0x100], esi
jb 0x402c24
mov edx, dword [esp + 0xec]
push edx
call fcn.0045e266
add esp, 4
lea eax, [esp + 0xec]
push eax
lea ecx, [esp + 0x38]
call fcn.00403f50
mov ecx, dword [esp + 0x2c]
push 0x76
push str.DEL.cpp
push eax
push 0x2710
mov byte [esp + 0x3d8], 0xf
call fcn.00451df0
cmp dword [esp + 0x100], 0x10
jb 0x402c6d
mov ecx, dword [esp + 0xec]
push ecx
call fcn.0045e266
add esp, 4
mov eax, dword [esp + 0x34]
mov ecx, dword [eax + 4]
lea edx, [esp + 0x84]
mov dword [esp + 0x28], edx
mov dword [esp + ecx + 0x34], edi
test byte [esp + 0x78], 1
lea edx, [esp + 0x38]
mov dword [esp + 0x30], edx
mov dword [esp + 0x38], vtable.std::basic_stringbuf_char__struct_std::char_traits_char___class_std::allocator_char__.0
je 0x402ca9
mov eax, dword [esp + 0x48]
mov eax, dword [eax]
push eax
call fcn.0045e266
add esp, 4
mov ecx, dword [esp + 0x48]
mov dword [ecx], 0
mov edx, dword [esp + 0x58]
mov dword [edx], 0
mov eax, dword [esp + 0x68]
mov dword [eax], 0
mov ecx, dword [esp + 0x4c]
mov dword [ecx], 0
mov edx, dword [esp + 0x5c]
mov dword [edx], 0
mov eax, dword [esp + 0x6c]
mov dword [eax], 0
and dword [esp + 0x78], 0xfffffffe
mov dword [esp + 0x74], 0
mov dword [esp + 0x38], vtable.std::basic_streambuf_char__struct_std::char_traits_char__.0
mov byte [esp + 0x3c8], 0x11
mov eax, dword [esp + 0x70]
mov ebx, eax
test eax, eax
je 0x402d56
mov edi, dword [eax]
test edi, edi
je 0x402d4d
push 0
lea ecx, [esp + 0x24]
call fcn.0044e6ed
mov eax, dword [edi + 4]
test eax, eax
je 0x402d2d
cmp eax, 0xffffffff
jae 0x402d2d
dec eax
mov dword [edi + 4], eax
mov esi, dword [edi + 4]
neg esi
sbb esi, esi
lea ecx, [esp + 0x20]
not esi
call fcn.0044e715
and esi, edi
je 0x402d4d
mov edx, dword [esi]
mov eax, dword [edx]
push 1
mov ecx, esi
call eax
push ebx
call fcn.0045e266
add esp, 4
lea ecx, [esp + 0x3c]
mov byte [esp + 0x3c8], 0x10
call fcn.0044edaa
mov byte [esp + 0x3c8], 2
mov ecx, dword [esp + 0x34]
mov edx, dword [ecx + 4]
lea eax, [esp + 0x84]
mov dword [esp + edx + 0x34], vtable.std::basic_ostream_char__struct_std::char_traits_char__.0
push eax
mov dword [esp + 0x88], vtable.std::ios_base.0
call fcn.0044ec40
mov ebx, dword [esp + 0x20]
mov edi, dword [esp + 0x30]
add esp, 4
lea esi, [esp + 0xec]
lea ecx, [esp + 0xd0]
call fcn.00403e30
cmp dword [eax + 0x14], 8
jb 0x402dbc
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
cmp dword [esp + 0x100], 8
mov dword [0x5398b0], eax
jb 0x402de2
mov ecx, dword [esp + 0xec]
push ecx
call fcn.0045e266
add esp, 4
cmp dword [0x5398b0], 0
jne 0x403331
xor edx, edx
lea eax, [esp + 0x1ac]
push eax
push edx
push edx
push 0x2b
push edx
mov word [esp + 0x1c0], dx
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
je 0x402f1b
push 0x9c40
mov ecx, edi
call fcn.00451de0
test al, al
je 0x402ef3
push 1
push 2
lea ecx, [esp + 0x3c]
call fcn.00403e50
lea ecx, [esp + 0x34]
push str.Failed_to_get_program_common_folder
push ecx
mov byte [esp + 0x3d0], 0x12
call fcn.00407000
add esp, 8
lea edx, [esp + 0xec]
push edx
lea ecx, [esp + 0x38]
call fcn.00403f50
push 0x7f
push str.DEL.cpp
push eax
push 0x9c40
mov ecx, edi
mov byte [esp + 0x3d8], 0x13
call fcn.00451df0
cmp dword [esp + 0x100], 0x10
jb 0x402e96
mov eax, dword [esp + 0xec]
push eax
call fcn.0045e266
add esp, 4
mov edx, dword [esp + 0x34]
mov eax, dword [edx + 4]
lea ecx, [esp + 0x84]
mov dword [esp + 0x18], ecx
mov dword [esp + eax + 0x34], vtable.std::basic_ostringstream_char__struct_std::char_traits_char___class_std::allocator_char__.0
lea ecx, [esp + 0x38]
mov byte [esp + 0x3c8], 0x14
call fcn.00403f80
mov byte [esp + 0x3c8], 2
mov ecx, dword [esp + 0x34]
mov edx, dword [ecx + 4]
mov dword [esp + edx + 0x34], vtable.std::basic_ostream_char__struct_std::char_traits_char__.0
lea eax, [esp + 0x84]
push eax
mov dword [esp + 0x88], vtable.std::ios_base.0
call fcn.0044ec40
add esp, 4
cmp dword [esp + 0xe4], 8
jb 0x402979
mov ecx, dword [esp + 0xd0]
push ecx
call fcn.0045e266
add esp, 4
mov eax, 2
jmp 0x40336d
cmp dword [esp + 0xe4], 8
mov eax, dword [esp + 0xd0]
mov dword [esp + 0xe0], 0
jae 0x402f3e
lea eax, [esp + 0xd0]
xor edx, edx
mov word [eax], dx
lea eax, [esp + 0x1ac]
push eax
lea ecx, [esp + 0xd4]
call fcn.00406bb0
push 0x5182a0
lea ecx, [esp + 0xd4]
call fcn.00406bb0
push 0x5182bc
lea ecx, [esp + 0xd4]
call fcn.00406bb0
push 0x518230
lea ecx, [esp + 0xd4]
call fcn.00406bb0
push 0x2710
mov ecx, edi
call fcn.00451de0
test al, al
je 0x403103
push 1
push 2
lea ecx, [esp + 0x3c]
call fcn.00403e50
lea esi, [esp + 0xec]
lea ecx, [esp + 0xd0]
mov byte [esp + 0x3c8], 0x15
call fcn.00403e30
mov byte [esp + 0x3c8], 0x16
cmp dword [eax + 0x14], 8
jb 0x402fd6
mov eax, dword [eax]
lea ecx, [esp + 0x128]
push 3
mov dword [esp + 0x128], ecx
push eax
lea ecx, [esp + 0x12c]
call fcn.00404a40
mov byte [esp + 0x3c8], 0x17
mov edx, dword [esp + 0x124]
push edx
push ecx
lea eax, [esp + 0x3c]
push str.DllPath:
push eax
call fcn.00407000
add esp, 0xc
push eax
call fcn.00407000
mov eax, dword [esp + 0x12c]
lea ecx, [esp + 0x130]
add esp, 8
cmp eax, ecx
je 0x40303a
push eax
call fcn.0045ec5a
add esp, 4
mov byte [esp + 0x3c8], 0x15
cmp dword [esp + 0x100], 8
jb 0x40305c
mov edx, dword [esp + 0xec]
push edx
call fcn.0045e266
add esp, 4
lea eax, [esp + 0xec]
push eax
lea ecx, [esp + 0x38]
call fcn.00403f50
push 0x89
push str.DEL.cpp
push eax
push 0x2710
mov ecx, edi
mov byte [esp + 0x3d8], 0x18
call fcn.00451df0
cmp dword [esp + 0x100], 0x10
jb 0x4030a6
mov ecx, dword [esp + 0xec]
push ecx
call fcn.0045e266
add esp, 4
mov eax, dword [esp + 0x34]
mov ecx, dword [eax + 4]
lea edx, [esp + 0x84]
mov dword [esp + 0x1c], edx
mov dword [esp + ecx + 0x34], vtable.std::basic_ostringstream_char__struct_std::char_traits_char___class_std::allocator_char__.0
lea ecx, [esp + 0x38]
mov byte [esp + 0x3c8], 0x19
call fcn.00403f80
mov byte [esp + 0x3c8], 2
mov edx, dword [esp + 0x34]
mov eax, dword [edx + 4]
lea ecx, [esp + 0x84]
mov dword [esp + eax + 0x34], vtable.std::basic_ostream_char__struct_std::char_traits_char__.0
push ecx
mov dword [esp + 0x88], vtable.std::ios_base.0
call fcn.0044ec40
add esp, 4
lea esi, [esp + 0xec]
lea ecx, [esp + 0xd0]
call fcn.00403e30
cmp dword [eax + 0x14], 8
jb 0x40311e
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
cmp dword [esp + 0x100], 8
mov dword [0x5398b0], eax
jb 0x403144
mov edx, dword [esp + 0xec]
push edx
call fcn.0045e266
add esp, 4
cmp dword [0x5398b0], 0
jne 0x403331
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x9c40
mov ecx, edi
mov esi, eax
call fcn.00451de0
cmp esi, 0x7e
jne 0x403268
test al, al
je 0x403244
push 1
push 2
lea ecx, [esp + 0x3c]
call fcn.00403e50
lea eax, [esp + 0x34]
push str.DEL_dll_file_not_found
push eax
mov byte [esp + 0x3d0], 0x1a
call fcn.00407000
add esp, 8
lea ecx, [esp + 0xec]
push ecx
lea ecx, [esp + 0x38]
call fcn.00403f50
push 0x92
push str.DEL.cpp
push eax
push 0x9c40
mov ecx, edi
mov byte [esp + 0x3d8], 0x1b
call fcn.00451df0
cmp dword [esp + 0x100], 0x10
jb 0x4031e7
mov edx, dword [esp + 0xec]
push edx
call fcn.0045e266
add esp, 4
mov ecx, dword [esp + 0x34]
mov edx, dword [ecx + 4]
lea eax, [esp + 0x84]
mov dword [esp + 0x18], eax
mov dword [esp + edx + 0x34], vtable.std::basic_ostringstream_char__struct_std::char_traits_char___class_std::allocator_char__.0
lea ecx, [esp + 0x38]
mov byte [esp + 0x3c8], 0x1c
call fcn.00403f80
mov byte [esp + 0x3c8], 2
mov eax, dword [esp + 0x34]
mov ecx, dword [eax + 4]
lea edx, [esp + 0x84]
mov dword [esp + ecx + 0x34], vtable.std::basic_ostream_char__struct_std::char_traits_char__.0
push edx
mov dword [esp + 0x88], vtable.std::ios_base.0
call fcn.0044ec40
add esp, 4
cmp dword [esp + 0xe4], 8
jb 0x40325e
mov eax, dword [esp + 0xd0]
push eax
call fcn.0045e266
add esp, 4
mov eax, 0x40
jmp 0x40336d
test al, al
je 0x402ef3
push 1
push 2
lea ecx, [esp + 0x3c]
call fcn.00403e50
push esi
push ecx
lea ecx, [esp + 0x3c]
push str.Error_loading_DEL_dll__error:
push ecx
mov byte [esp + 0x3d8], 0x1d
call fcn.00407000
add esp, 0xc
mov ecx, eax
call fcn.00403760
lea edx, [esp + 0x108]
push edx
lea ecx, [esp + 0x38]
call fcn.00403f50
push 0x96
push str.DEL.cpp
push eax
push 0x9c40
mov ecx, edi
mov byte [esp + 0x3d8], 0x1e
call fcn.00451df0
cmp dword [esp + 0x11c], 0x10
jb 0x4032ea
mov eax, dword [esp + 0x108]
push eax
call fcn.0045e266
add esp, 4
mov edx, dword [esp + 0x34]
mov eax, dword [edx + 4]
lea ecx, [esp + 0x84]
mov dword [esp + 0x18], ecx
mov dword [esp + eax + 0x34], vtable.std::basic_ostringstream_char__struct_std::char_traits_char___class_std::allocator_char__.0
lea ecx, [esp + 0x38]
mov byte [esp + 0x3c8], 0x1f
call fcn.00403f80
mov byte [esp + 0x3c8], 2
mov ecx, dword [esp + 0x34]
mov edx, dword [ecx + 4]
mov dword [esp + edx + 0x34], vtable.std::basic_ostream_char__struct_std::char_traits_char__.0
jmp 0x402ed8
lea edi, [esp + 0x1c]
call fcn.004034a0
test al, al
je 0x403393
mov edx, dword [esp + 0x18]
mov eax, dword [ebp + 8]
push edx
push eax
call dword [0x5398b8]
add esp, 8
test eax, eax
jne 0x403393
inc dword [0x5398b4]
lea ecx, [esp + 0xd0]
call fcn.00403de0
inc dword [ebx]
mov eax, 0x1000
mov ecx, dword [esp + 0x3c0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3a8]
xor ecx, esp
call fcn.0045f14f
mov esp, ebp
pop ebp
ret 0xc
mov ecx, dword [0x5398b0]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [esp + 0xe4], 8
mov dword [0x5398b0], 0
jb 0x402979
mov edx, dword [esp + 0xd0]
push edx
call fcn.0045e266
add esp, 4
mov eax, 2
jmp 0x40336d