Function at 0x401000
Capabilities:
Get common file path

Disassembly:
sub esp, 0x190
push ebx
push ebp
mov ebp, dword [esp + 0x1a4]
push esi
push edi
xor ebx, ebx
or edi, 0xffffffff
cmp ebp, ebx
je 0x401268
mov al, byte [ebp]
mov esi, ebp
cmp al, 0x22
jne 0x401042
lea eax, [ebp + 1]
push 0x22
push eax
call fcn.00410970
add esp, 8
cmp eax, ebx
je 0x4012d8
lea esi, [eax + 2]
jmp 0x40106a
push 0x2e
push ebp
call fcn.00410970
mov edi, eax
add esp, 8
cmp edi, ebx
je 0x40106a
push 4
push str..exe
push edi
call fcn.00415570
add esp, 0xc
test eax, eax
jne 0x40106a
lea esi, [edi + 5]
mov ecx, 0x13
xor eax, eax
lea edi, [esp + 0x4d]
mov byte [esp + 0x4c], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x20
push esi
stosb byte es:[edi], al
call fcn.00410970
add esp, 8
cmp eax, ebx
jne 0x40109d
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov eax, ecx
jmp 0x40109f
sub eax, esi
cmp eax, 0x50
jl 0x4010ab
mov eax, 0x4f
jmp 0x4010af
cmp eax, ebx
jle 0x4010be
push eax
lea ecx, [esp + 0x50]
push esi
push ecx
call fcn.00410860
add esp, 0xc
lea edx, [esp + 0x4c]
push 0x2c
push edx
call fcn.00410970
add esp, 8
cmp eax, ebx
je 0x4012c8
lea esi, [eax + 1]
mov byte [eax], bl
mov eax, dword [str.CC]
lea ecx, [esp + 0x4c]
push 0x5c
push ecx
mov dword [esp + 0x18], eax
call fcn.00410970
add esp, 8
test eax, eax
jne 0x401157
mov ecx, 0x40
lea edi, [esp + 0x9d]
mov byte [esp + 0x9c], bl
lea edx, [esp + 0x9c]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x104
push edx
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea eax, [esp + 0x4c]
lea ecx, [esp + 0x48]
push eax
call fcn.00401430
mov ecx, dword [eax]
lea edx, [esp + 0x9c]
push ecx
push edx
lea eax, [esp + 0x18]
push 0x430040
push eax
call fcn.00404bc0
add esp, 0x10
lea ecx, [esp + 0x48]
call fcn.00401d60
jmp 0x401165
lea ecx, [esp + 0x4c]
push ecx
lea ecx, [esp + 0x14]
call fcn.00401fc0
mov eax, dword [str.CC]
lea edx, [esp + 0x14]
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x10]
push ebx
push edx
push eax
mov word [esp + 0x20], bx
mov word [esp + 0x22], bx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
call fcn.0041ac20
mov ecx, dword [esp + 0x24]
add esp, 0xc
shr ecx, 0x10
cmp ecx, 4
jne 0x401277
cmp word [esp + 0x18], 0x54
jne 0x401277
lea edx, [esp + 0x4c]
push edx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
cmp eax, ebx
je 0x401277
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x401206
mov ecx, dword [esp + 0x1b0]
mov edx, dword [esp + 0x1a4]
push ecx
push ebp
push edx
push ebx
call eax
lea ecx, [esp + 0x44]
xor esi, esi
call fcn.00401d60
lea ecx, [esp + 0x40]
call fcn.00401d60
lea ecx, [esp + 0x3c]
call fcn.00401d60
lea ecx, [esp + 0x38]
call fcn.00401d60
lea ecx, [esp + 0x34]
call fcn.00401d60
lea ecx, [esp + 0x30]
call fcn.00401d60
lea ecx, [esp + 0x2c]
call fcn.00401d60
lea ecx, [esp + 0x28]
call fcn.00401d60
lea ecx, [esp + 0x10]
call fcn.00401d60
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x190
ret 0x10
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x190
ret 0x10
lea ecx, [esp + 0x44]
call fcn.00401d60
lea ecx, [esp + 0x40]
call fcn.00401d60
lea ecx, [esp + 0x3c]
call fcn.00401d60
lea ecx, [esp + 0x38]
call fcn.00401d60
lea ecx, [esp + 0x34]
call fcn.00401d60
lea ecx, [esp + 0x30]
call fcn.00401d60
lea ecx, [esp + 0x2c]
call fcn.00401d60
lea ecx, [esp + 0x28]
call fcn.00401d60
lea ecx, [esp + 0x10]
call fcn.00401d60
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x190
ret 0x10
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x190
ret 0x10