Function at 0x100218e9
Capabilities:
Get common file path

Disassembly:
mov eax, 0x100470e7
call fcn.10008950
sub esp, 0x12c
mov eax, dword [0x1005e5e4]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, ecx
mov ecx, dword [esi + 0xc]
mov dword [ebp - 0x10], eax
lea ebx, [edi + 0x1c]
mov eax, dword [ebx]
mov eax, dword [eax - 0xc]
test eax, eax
jne 0x10021926
test ecx, ecx
je 0x10021926
push eax
push ebx
push dword [esi + 4]
call fcn.10022cf2
mov eax, dword [edi + 8]
mov ecx, dword [eax]
xor eax, eax
cmp dword [ecx - 0xc], eax
jne 0x1002194e
mov ebx, dword [ebx]
cmp dword [ebx - 0xc], eax
je 0x10021941
mov eax, dword [esi]
push ebx
mov ecx, esi
call dword [eax + 0xc]
mov eax, dword [esi]
push 0
mov ecx, esi
call dword [eax]
jmp 0x10021b7b
cmp dword [esi + 0xc], eax
je 0x10021b7b
xor ebx, ebx
cmp dword [edi + 4], eax
jle 0x10021978
mov eax, dword [esi + 4]
mov ecx, dword [esi + 0xc]
push 0
add eax, ebx
push eax
push dword [ecx + 4]
call dword [sym.imp.USER32.dll_DeleteMenu]
inc ebx
cmp ebx, dword [edi + 4]
jl 0x1002195e
lea eax, [ebp - 0x120]
push eax
mov ebx, 0x104
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x10021b7b
cmp eax, ebx
jae 0x10021b7b
lea eax, [ebp - 0x120]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ebx, eax
mov byte [ebp + ebx - 0x120], 0x5c
inc ebx
mov dword [ebp - 0x130], ebx
mov byte [ebp + ebx - 0x120], 0
call fcn.10020d0d
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x128], eax
and dword [ebp - 4], 0
call fcn.10020d0d
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x124], eax
and dword [ebp + 8], 0
cmp dword [edi + 4], 0
mov byte [ebp - 4], 1
jle 0x10021b46
jmp 0x10021a09
mov ebx, dword [ebp - 0x130]
mov eax, dword [edi]
push 1
push ebx
lea ecx, [ebp - 0x120]
push ecx
push dword [ebp + 8]
lea ecx, [ebp - 0x128]
push ecx
mov ecx, edi
call dword [eax + 8]
test eax, eax
je 0x10021b46
mov ebx, dword [ebp - 0x128]
mov eax, dword [ebx - 0xc]
add eax, eax
push eax
lea ecx, [ebp - 0x124]
call fcn.100054c8
jmp 0x10021a65
cmp cl, 0x26
jne 0x10021a4d
mov byte [eax], cl
inc eax
mov cl, byte [ebx]
movzx edx, cl
test byte [edx + 0x100631c1], 4
je 0x10021a5f
mov byte [eax], cl
inc eax
inc ebx
mov cl, byte [ebx]
mov byte [eax], cl
inc eax
inc ebx
mov cl, byte [ebx]
test cl, cl
jne 0x10021a45
mov byte [eax], cl
push 0xffffffffffffffff
lea ecx, [ebp - 0x124]
call fcn.10005989
mov eax, dword [edi + 0x14]
mov ecx, dword [ebp + 8]
lea eax, [eax + ecx + 1]
and eax, 0xf
cmp eax, 0xa
jle 0x10021a94
push eax
push 0x1004db98
jmp 0x10021aad
jne 0x10021aa7
push str.10
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp 0x10021aba
push eax
push str._d
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x134]
call fcn.10005857
lea ecx, [ebp - 0x124]
push ecx
push eax
lea eax, [ebp - 0x138]
push eax
mov byte [ebp - 4], 2
call fcn.1002164a
mov edx, dword [esi + 8]
mov ecx, dword [esi + 4]
lea ebx, [edx + 1]
mov dword [esi + 8], ebx
lea ebx, [ecx + 1]
add esp, 0xc
mov dword [esi + 4], ebx
mov eax, dword [eax]
mov dword [ebp - 0x12c], eax
push dword [ebp - 0x12c]
mov eax, dword [esi + 0xc]
push ecx
push 0x400
push edx
push dword [eax + 4]
call dword [sym.imp.USER32.dll_InsertMenuA]
mov ecx, dword [ebp - 0x138]
add ecx, 0xfffffff0
call fcn.10005435
mov ecx, dword [ebp - 0x134]
add ecx, 0xfffffff0
mov byte [ebp - 4], 1
call fcn.10005435
inc dword [ebp + 8]
mov eax, dword [ebp + 8]
cmp eax, dword [edi + 4]
jl 0x10021a03
mov eax, dword [esi + 0xc]
dec dword [esi + 8]
push dword [eax + 4]
call dword [sym.imp.USER32.dll_GetMenuItemCount]
mov ecx, dword [ebp - 0x124]
add ecx, 0xfffffff0
mov dword [esi + 0x20], eax
mov dword [esi + 0x18], 1
call fcn.10005435
mov ecx, dword [ebp - 0x128]
add ecx, 0xfffffff0
call fcn.10005435
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
pop ebx
call fcn.10008880
leave
ret 4