Function at 0x401e10
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4051f0
mov eax, dword fs:[0]
push eax
sub esp, 0xf8
mov eax, dword [0x409004]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 0
mov edx, dword [0x409028]
cmp edx, 0x104
jb 0x401e7b
cmp dword [0x40902c], 8
mov eax, 0x409018
mov dword [0x409028], 0x104
cmovae eax, dword [0x409018]
xor ecx, ecx
mov word [eax + 0x208], cx
jmp 0x401ee0
mov edi, dword [0x40902c]
mov ecx, 0x104
mov eax, edi
sub ecx, edx
sub eax, edx
cmp ecx, eax
ja 0x401ec6
cmp edi, 8
mov dword [0x409028], 0x104
mov esi, 0x409018
cmovae esi, dword [0x409018]
lea edi, [esi + edx*2]
test ecx, ecx
je 0x401ebb
xor eax, eax
shr ecx, 1
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
xor eax, eax
mov word [esi + 0x208], ax
jmp 0x401ee0
push ecx
push ecx
mov byte [ebp - 0xd8], 0
push dword [ebp - 0xd8]
push ecx
mov ecx, 0x409018
call fcn.00403ab0
cmp dword [0x40902c], 8
mov eax, 0x409018
cmovae eax, dword [0x409018]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov esi, dword [0x409028]
mov edx, eax
cmp edx, esi
ja 0x401f2c
cmp dword [0x40902c], 8
mov ecx, 0x409018
mov dword [0x409028], edx
cmovae ecx, dword [0x409018]
xor eax, eax
mov word [ecx + edx*2], ax
jmp 0x401f87
mov edi, dword [0x40902c]
mov ecx, edx
mov eax, edi
sub ecx, esi
sub eax, esi
cmp ecx, eax
ja 0x401f6d
cmp edi, 8
mov dword [0x409028], edx
mov ebx, 0x409018
cmovae ebx, dword [0x409018]
lea edi, [ebx + esi*2]
test ecx, ecx
je 0x401f65
xor eax, eax
shr ecx, 1
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
xor eax, eax
mov word [ebx + edx*2], ax
jmp 0x401f87
push ecx
push ecx
mov byte [ebp - 0xd8], 0
push dword [ebp - 0xd8]
push ecx
mov ecx, 0x409018
call fcn.00403ab0
mov esi, dword [0x40902c]
mov eax, esi
mov edx, dword [0x409028]
sub eax, edx
cmp eax, 1
jb 0x401fc5
cmp esi, 8
lea ecx, [edx + 1]
mov eax, 0x409018
mov dword [0x409028], ecx
cmovae eax, dword [0x409018]
mov esi, 0x5c
mov word [eax + edx*2], si
xor edx, edx
mov word [eax + ecx*2], dx
jmp 0x401fdc
push 1
push ecx
mov byte [ebp - 0xd8], 0
push dword [ebp - 0xd8]
push 1
call fcn.00403c40
xorps xmm0, xmm0
mov dword [ebp - 0x14], 0
movq qword [ebp - 0x1c], xmm0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
sub esp, 0x18
mov byte [ebp - 4], 1
lea eax, [ebp + 8]
mov ecx, esp
lea esi, [ebp - 0x1c]
push eax
call fcn.00402ff0
mov ecx, esi
call fcn.004013e0
mov edi, dword [ebp - 0x18]
mov eax, 0x92492493
mov esi, dword [ebp - 0x1c]
mov ecx, edi
sub ecx, esi
add esp, 0x18
imul ecx
add edx, ecx
mov ecx, 0
sar edx, 4
mov eax, edx
mov dword [ebp - 0xd8], ecx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0xe4], eax
je 0x4021cf
lea edx, [eax - 1]
xor ebx, ebx
mov dword [ebp - 0xdc], edx
nop
mov eax, dword [esi + ebx + 0x18]
mov dword [ebp - 0xe0], eax
cmp ecx, edx
jne 0x402190
cmp dword [ebp + 0x1c], 8
lea eax, [ebp - 0xd4]
push 0xb8
push 0
lea esi, [ebp + 8]
cmovae esi, dword [ebp + 8]
push eax
call sub.VCRUNTIME140.dll_memset
push esi
lea ecx, [ebp - 0xd4]
call fcn.00402ee0
mov byte [ebp - 4], 2
cmp dword [ebp - 0x78], 0
jne 0x402110
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0xd4]
mov eax, dword [eax + 4]
mov dword [ebp + eax - 0xd4], vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0xd4]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x70]
mov dword [ebp + ecx - 0xd8], eax
lea ecx, [ebp - 0xc4]
call fcn.00402e00
lea ecx, [ebp - 0xbc]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_istream_char__struct_std::char_traits_char__::destructor_void_]
lea ecx, [ebp - 0x64]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::destructor_void_]
mov eax, dword [ebp - 0xe0]
xorps xmm0, xmm0
mov esi, dword [ebp - 0x1c]
movlpd qword [ebp - 0xec], xmm0
mov edi, dword [ebp - 0xec]
jmp 0x402194
push 2
push 0
push 0
lea ecx, [ebp - 0xd4]
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_istream_char__struct_std::char_traits_char______thiscall_std::basic_istream_char__struct_std::char_traits_char__::seekg_long_long___int64___int_]
lea eax, [ebp - 0x104]
push eax
lea ecx, [ebp - 0xd4]
call dword [sym.imp.MSVCP140.dll_public:_class_std::fpos_struct__Mbstatet____thiscall_std::basic_istream_char__struct_std::char_traits_char__::tellg_void_]
mov edi, dword [eax + 8]
add edi, dword [eax]
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0xd4]
mov eax, dword [eax + 4]
mov dword [ebp + eax - 0xd4], vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0xd4]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x70]
mov dword [ebp + ecx - 0xd8], eax
lea ecx, [ebp - 0xc4]
call fcn.00402e00
lea ecx, [ebp - 0xbc]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_istream_char__struct_std::char_traits_char__::destructor_void_]
lea ecx, [ebp - 0x64]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::destructor_void_]
mov eax, dword [ebp - 0xe0]
mov esi, dword [ebp - 0x1c]
jmp 0x402194
mov edi, dword [esi + ebx + 0x34]
sub edi, eax
lea edx, [esi + ebx]
push edi
push eax
lea ecx, [ebp + 8]
call fcn.004019a0
mov ecx, dword [ebp - 0xd8]
add esp, 8
mov esi, dword [ebp - 0x1c]
inc ecx
add ebx, 0x1c
mov dword [ebp - 0xd8], ecx
cmp ecx, dword [ebp - 0xe4]
jae 0x4021cc
mov edx, dword [ebp - 0xdc]
jmp 0x402060
mov edi, dword [ebp - 0x18]
test esi, esi
je 0x402240
push ecx
mov edx, edi
mov ecx, esi
call fcn.00403a40
mov ecx, dword [ebp - 0x14]
mov eax, 0x92492493
mov esi, dword [ebp - 0x1c]
add esp, 4
sub ecx, esi
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ecx, [eax*8]
sub ecx, eax
mov eax, esi
shl ecx, 2
cmp ecx, 0x1000
jb 0x402221
mov esi, dword [eax - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40226c
push ecx
push esi
call fcn.004045f5
add esp, 8
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov ecx, dword [ebp + 0x1c]
cmp ecx, 8
jb 0x40227c
mov edx, dword [ebp + 8]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x402272
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x402272
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.004045f5
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00404361
mov esp, ebp
pop ebp
ret