Function at 0x1021f870
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x210
mov eax, dword [0x103c2010]
xor eax, ebp
mov dword [ebp - 0x10], eax
mov bl, 1
cmp dword [0x103cdf38], 0
jne 0x1021fadf
mov eax, dword [0x103cdf24]
test eax, eax
je 0x1021f95f
test byte [0x103c5b84], 1
je 0x1021fadf
cmp byte [eax + 0xb], 0
jns 0x1021f8b7
mov eax, dword [eax]
sub esp, 0x1c
movaps xmm0, xmmword [0x103666d0]
movups xmmword [esp + 4], xmm0
mov dword [esp], eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x80
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [0x103cdf38], eax
inc eax
cmp eax, 1
ja 0x1021fadf
lea eax, [ebp - 0x216]
push 0x206
push 0xff
push eax
call fcn.102f7d80
add esp, 0xc
mov word [ebp - 0x218], 0
lea esi, [ebp - 0x218]
push esi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
add eax, 0xfffffefb
cmp eax, 0xfffffefc
jb 0x1021fadd
mov ecx, dword [0x103cdf24]
push esi
call fcn.101e0f9c
mov ecx, dword [0x103cdf24]
movzx eax, byte [ecx + 0xb]
test al, al
js 0x1021fa2e
test eax, eax
je 0x1021faf6
mov edx, ecx
jmp 0x1021fa3b
push 0xc
call fcn.102f3c36
add esp, 4
mov ebx, eax
lea esi, [ebp - 0x218]
push 0x208
push 0xff
push esi
call fcn.102f7d80
add esp, 0xc
push 0x104
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov dword [ebx], 0xffffffff
mov dword [ebx + 4], 0xffffffff
mov dword [ebx + 8], 0xffffffff
mov ecx, ebx
push esi
call fcn.100f7978
movzx ecx, byte [ebx + 0xb]
test cl, cl
mov eax, dword [ebx]
mov edx, dword [ebx + 4]
mov edi, ecx
cmovs edi, edx
mov dword [ebp - 0x21c], ebx
mov esi, ebx
cmovs esi, eax
test edi, edi
je 0x1021fac1
add edi, edi
nop word cs:[eax + eax]
test edi, edi
je 0x1021fac1
lea ebx, [edi - 2]
cmp word [esi + edi - 2], 0x5c
mov edi, ebx
jne 0x1021f9e0
cmp ebx, 0xfffffffe
je 0x1021fac1
mov edi, ebx
sar edi, 1
lea esi, [edi + 1]
test cl, cl
js 0x1021faad
cmp edi, ecx
jae 0x1021fb25
cmp ebx, 8
jae 0x1021fb07
mov eax, dword [ebp - 0x21c]
mov ecx, esi
mov byte [eax + 0xb], cl
jmp 0x1021faba
mov eax, dword [ecx + 4]
test eax, eax
je 0x1021faf6
mov edx, dword [ecx]
cmp word [edx + eax*2 - 2], 0x5c
je 0x1021fa55
push 1
push 0x103565aa
call fcn.101e1140
mov ecx, dword [0x103cdf24]
push 9
push str.debug.log
call fcn.101e1140
mov eax, dword [0x103cdf24]
cmp byte [eax + 0xb], 0
jns 0x1021fa6e
mov eax, dword [eax]
movaps xmm0, xmmword [0x103666d0]
sub esp, 0x1c
movups xmmword [esp + 4], xmm0
mov dword [esp], eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x80
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [0x103cdf38], eax
inc eax
cmp eax, 1
ja 0x1021fadf
mov dword [0x103cdf38], 0
jmp 0x1021fadd
cmp edx, edi
jbe 0x1021fb25
mov ecx, dword [ebp - 0x21c]
mov dword [ecx + 4], esi
mov word [eax + edi*2 + 2], 0
mov ecx, dword [ebp - 0x21c]
push 9
push str.debug.log
call fcn.101e1140
mov dword [0x103cdf24], 0
xor ebx, ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.102f4c53
mov eax, ebx
add esp, 0x210
pop esi
pop edi
pop ebx
pop ebp
ret
push str.string::back__:_string_is_empty
push str._empty__
push 0x4d1
jmp 0x1021fb16
push 0x10352258
push str.__s_____min_cap
push 0x6d7
push str....._buildtools_third_partylibc_trunkinclude_string
push str._s:_d:_assertion__s_failed:__s
call fcn.10090eb0
call fcn.10308bbb
int3