Function at 0x10021020
Capabilities:
Get common file path

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xa5c
mov eax, dword [0x100a80a4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x104
lea eax, [ebp - 0x348]
mov ebx, ecx
push eax
push 0xffffffffffffffff
xor esi, esi
push ebx
push esi
push esi
mov dword [ebp - 0x9b4], esi
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea eax, [ebp - 0x348]
push 0x5c
push eax
call dword [sym.imp.msvcrt.dll_wcsrchr]
mov edi, eax
add esp, 8
test edi, edi
jne 0x10021079
lea edi, [ebp - 0x348]
jmp 0x1002107c
add edi, 2
push edi
call dword [sym.imp.msvcrt.dll__wcslwr]
add esp, 4
lea ecx, [ebp - 0x9fc]
call fcn.100206a0
test eax, eax
je 0x10021578
push 0
push 0x80
push 3
push 0
push 3
push 0x80000000
push ebx
mov dword [ebp - 0x9ac], esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x9bc], eax
cmp eax, 0xffffffff
jne 0x100211cb
test ebx, ebx
je 0x10021578
mov esi, 0x104
mov eax, ebx
cmp byte [eax], 0
je 0x100210e1
inc eax
sub esi, 1
jne 0x100210d6
test esi, esi
je 0x10021576
push 0x104
lea eax, [ebp - 0x140]
push 0
push eax
call sub.msvcrt.dll_memset
lea eax, [esi - 0x104]
add esp, 0xc
neg esi
sbb esi, esi
and esi, eax
lea eax, [ebp - 0x140]
add esi, 0x102
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x10021576
mov ecx, 0x104
lea eax, [ebp - 0x140]
cmp byte [eax], 0
je 0x1002113d
inc eax
sub ecx, 1
jne 0x10021132
mov esi, 0x104
test ecx, ecx
je 0x10021168
mov eax, esi
mov edx, esi
sub eax, ecx
neg ecx
sbb ecx, ecx
and ecx, eax
lea eax, [ebp - 0x140]
push ecx
push 0x100050f4
push ecx
sub edx, ecx
add ecx, eax
call fcn.10020650
mov ecx, esi
lea eax, [ebp - 0x140]
cmp byte [eax], 0
je 0x1002117b
inc eax
sub ecx, 1
jne 0x10021170
test ecx, ecx
je 0x1002119d
mov eax, esi
sub eax, ecx
neg ecx
sbb ecx, ecx
and ecx, eax
lea eax, [ebp - 0x140]
push ecx
push ebx
sub esi, ecx
push ecx
add ecx, eax
mov edx, esi
call fcn.10020650
push 0
push 0x80
push 3
push 0
push 3
push 0x80000000
lea eax, [ebp - 0x140]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x9bc], eax
cmp eax, 0xffffffff
je 0x10021576
mov esi, dword [ebp - 0x9dc]
lea ecx, [ebp - 0x9ac]
push 0
push 0
push ecx
push eax
mov ecx, esi
call dword [0x100ae518]
call esi
test eax, eax
je 0x10021562
push dword [ebp - 0x9ac]
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x9b0], eax
test eax, eax
je 0x10021562
mov esi, dword [ebp - 0x9dc]
xor ebx, ebx
push ebx
push eax
lea eax, [ebp - 0x9ac]
mov dword [ebp - 0x9b8], 0
push eax
push dword [ebp - 0x9bc]
mov ecx, esi
mov dword [ebp - 0x358], 0xf750e6c3
mov dword [ebp - 0x354], 0x11d138ee
mov dword [ebp - 0x350], 0xc000e585
mov dword [ebp - 0x34c], 0xee95c24f
call dword [0x100ae518]
call esi
test eax, eax
je 0x1002128e
mov esi, dword [ebp - 0x9e0]
lea eax, [ebp - 0x9b8]
push eax
push ebx
push dword [ebp - 0x9ac]
mov ecx, esi
push dword [ebp - 0x9b0]
push dword [ebp - 0x9f0]
call dword [0x100ae518]
call esi
mov ebx, eax
lea eax, [ebp - 0x9a8]
mov dword [ebp - 0xa50], 0
push 0x43c
mov dword [ebp - 0xa54], eax
lea eax, [ebp - 0x9a4]
push 0
push eax
mov dword [ebp - 0xa38], 0
mov dword [ebp - 0xa34], 0
mov dword [ebp - 0xa30], 0
mov dword [ebp - 0xa2c], 0
mov dword [ebp - 0xa28], 0
mov dword [ebp - 0xa58], 0x34
mov dword [ebp - 0xa4c], 2
mov dword [ebp - 0xa48], 0
mov dword [ebp - 0xa44], 2
mov dword [ebp - 0xa3c], 3
call sub.msvcrt.dll_memset
lea eax, [ebp - 0xa24]
mov dword [ebp - 0x9a8], 0x440
mov dword [ebp - 0xa40], eax
add esp, 0xc
mov eax, dword [ebp - 0x9b0]
mov dword [ebp - 0xa0c], eax
mov eax, dword [ebp - 0x9ac]
mov dword [ebp - 0xa20], 0
mov dword [ebp - 0xa1c], 0
mov dword [ebp - 0xa14], 0
mov dword [ebp - 0xa10], 0
mov dword [ebp - 0xa04], 0
mov dword [ebp - 0xa00], 0
mov dword [ebp - 0xa24], 0x28
mov dword [ebp - 0xa08], eax
mov dword [ebp - 0xa18], edi
test ebx, ebx
je 0x10021556
push 0x208
lea eax, [ebp - 0x564]
push 0
push eax
call sub.msvcrt.dll_memset
mov esi, dword [ebp - 0x9cc]
lea eax, [ebp - 0x568]
add esp, 0xc
mov dword [ebp - 0x568], 0x20c
mov ecx, esi
push 0
push eax
push ebx
call dword [0x100ae518]
call esi
test eax, eax
je 0x1002140e
mov esi, dword [ebp - 0x9c4]
lea eax, [ebp - 0x564]
mov dword [ebp - 0xa1c], eax
mov ecx, esi
lea eax, [ebp - 0xa58]
push eax
lea eax, [ebp - 0x358]
push eax
push 0
call dword [0x100ae518]
call esi
test eax, eax
je 0x1002144e
mov esi, dword [ebp - 0x9e0]
lea eax, [ebp - 0x9b8]
push eax
push 0
push dword [ebp - 0x9ac]
mov ecx, esi
mov dword [ebp - 0x9b8], ebx
push dword [ebp - 0x9b0]
push dword [ebp - 0x9f0]
call dword [0x100ae518]
call esi
mov ebx, eax
test ebx, ebx
jne 0x100213a0
jmp 0x10021556
mov esi, dword [ebp - 0x9e4]
lea eax, [ebp - 0x564]
push 0
push 0
push 0
push 4
push eax
mov ecx, esi
mov dword [ebp - 0x9b4], 1
call dword [0x100ae518]
call esi
mov esi, dword [ebp - 0x9e8]
mov ecx, esi
push 0x10005118
push eax
mov dword [ebp - 0x9c0], eax
call dword [0x100ae518]
call esi
test eax, eax
je 0x10021523
push 0
push 0
push 0x32
lea ecx, [ebp - 0x38]
push ecx
push 0xffffffffffffffff
push dword [eax + 0x10]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
cmp byte [ebp - 0x38], 0
lea edi, [ebp - 0x38]
je 0x100214e8
mov esi, 0x10005130
mov eax, edi
sub esi, eax
mov eax, edi
mov cl, 0x3a
lea ebx, [ebx]
mov edx, eax
cmp byte [eax], cl
jne 0x100214e1
mov cl, byte [edx + esi + 1]
inc eax
test cl, cl
jne 0x100214d0
jmp 0x100214ea
inc edi
dec esi
cmp byte [edi], 0
jne 0x100214c6
xor edi, edi
inc edi
push edi
mov byte [edi + 4], 0
call dword [sym.imp.msvcrt.dll_atoi]
mov esi, eax
mov byte [edi + 7], 0
lea eax, [edi + 5]
shl esi, 0x10
push eax
call dword [sym.imp.msvcrt.dll_atoi]
shl eax, 8
or esi, eax
lea eax, [edi + 8]
push eax
call dword [sym.imp.msvcrt.dll_atoi]
add esp, 0xc
or esi, eax
mov dword [ebp - 0x9b4], esi
push dword [ebp - 0x9c0]
mov esi, dword [ebp - 0x9ec]
mov ecx, esi
call dword [0x100ae518]
call esi
test ebx, ebx
je 0x10021556
mov esi, dword [ebp - 0x9d0]
mov ecx, esi
push 0
push ebx
push dword [ebp - 0x9f0]
call dword [0x100ae518]
call esi
push dword [ebp - 0x9b0]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 0x9bc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp - 0x9b4]
jmp 0x10021578
xor esi, esi
cmp dword [ebp - 0x9fc], 0
je 0x100215c8
mov esi, dword [ebp - 0x9d4]
mov ecx, esi
push 0
push dword [ebp - 0x9f0]
call dword [0x100ae518]
call esi
push dword [ebp - 0x9f8]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push dword [ebp - 0x9f4]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [ebp - 0x9b4]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100a1500
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100a1500
mov esp, ebp
pop ebp
ret