Function at 0x4709c0
Capabilities:
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x6e8cee
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x394
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0x60]
push 0x104
push eax
mov dword [esp + 0x48], ecx
push 0
mov dword [esp + 0x48], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [esp + 0x164]
lea edx, [esp + 0x14]
push 0
push 0
push ecx
lea eax, [esp + 0x6c]
push edx
push eax
call fcn.00661b17
mov cl, byte [esp + 0x27]
add esp, 0x14
mov byte [esp + 0x18], cl
lea ecx, [esp + 0x18]
push 0
call fcn.00407e50
lea edi, [esp + 0x14]
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
lea ecx, [esp + 0x1c]
push ebp
call fcn.00402d20
test al, al
je 0x470a70
mov edi, dword [esp + 0x1c]
mov ecx, ebp
mov edx, ecx
lea esi, [esp + 0x14]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x1c]
call fcn.00408980
lea edi, [esp + 0x164]
or ecx, 0xffffffff
xor eax, eax
mov dword [esp + 0x3ac], 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + 0x164]
push ecx
push eax
lea ecx, [esp + 0x20]
call fcn.0040cce0
lea ecx, [esp + 0x18]
lea edx, [esp + 0x28]
push str.dataheroes4.h4r
push ecx
push edx
call fcn.0046e7a0
mov eax, dword [eax + 4]
add esp, 0xc
test eax, eax
jne 0x470ac1
mov eax, 0x71eb04
mov ebx, dword [sym.imp.KERNEL32.dll_FindFirstFileA]
lea ecx, [esp + 0x264]
push ecx
push eax
call ebx
lea ecx, [esp + 0x28]
mov esi, eax
push 1
call fcn.00407e50
cmp esi, 0xffffffff
jne 0x470c4e
lea edx, [esp + 0x60]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea edi, [esp + 0x60]
or ecx, esi
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
lea ecx, [esp + 0x1c]
push ebp
call fcn.00402d20
test al, al
je 0x470b39
mov edi, dword [esp + 0x1c]
mov ecx, ebp
mov eax, ecx
lea esi, [esp + 0x60]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x1c]
call fcn.00408980
push 0x5c
push 1
lea ecx, [esp + 0x20]
call fcn.0040cb30
lea ecx, [esp + 0x18]
lea edx, [esp + 0x28]
push str.dataheroes4.h4r
push ecx
push edx
call fcn.0046e7a0
mov eax, dword [eax + 4]
add esp, 0xc
test eax, eax
jne 0x470b69
mov eax, 0x71eb04
lea ecx, [esp + 0x264]
push ecx
push eax
call ebx
lea ecx, [esp + 0x28]
mov esi, eax
push 1
call fcn.00407e50
cmp esi, 0xffffffff
jne 0x470c4e
mov dl, byte [esp + 0x13]
push 0
lea ecx, [esp + 0x2c]
mov byte [esp + 0x2c], dl
call fcn.00407e50
mov edi, 0x81e44c
or ecx, esi
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
lea ecx, [esp + 0x2c]
push ebp
call fcn.00402d20
test al, al
je 0x470be0
mov edi, dword [esp + 0x2c]
mov ecx, ebp
mov eax, ecx
mov esi, 0x81e44c
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x2c]
call fcn.00408980
lea ecx, [esp + 0x38]
mov bl, 2
push ecx
lea ecx, [esp + 0x48]
mov byte [esp + 0x3b0], bl
mov dword [esp + 0x3c], 0x81e44c
call fcn.00660a1c
mov dl, byte [esp + 0x28]
push 0
lea ecx, [esp + 0x54]
mov byte [esp + 0x3b0], 3
mov byte [esp + 0x54], dl
call fcn.00407e50
mov eax, dword [0x71eb00]
lea ecx, [esp + 0x28]
push eax
push 0
push ecx
lea ecx, [esp + 0x5c]
call fcn.00407c50
lea edx, [esp + 0x44]
mov dword [esp + 0x44], vtable.std::runtime_error.0
push 0x788fc8
push edx
mov byte [esp + 0x3b4], bl
call fcn.006609b5
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov esi, dword [esp + 0x40]
mov al, byte [esp + 0x18]
push 0
mov ecx, esi
mov byte [esi], al
call fcn.00407e50
mov ecx, dword [0x71eb00]
lea edx, [esp + 0x18]
push ecx
push 0
push edx
mov ecx, esi
call fcn.00407c50
mov dword [esp + 0x3c], 1
push 1
lea ecx, [esp + 0x1c]
mov byte [esp + 0x3b0], 0
call fcn.00407e50
mov eax, esi
mov ecx, dword [esp + 0x3a4]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x3a0
ret