Function at 0x10021bf0
Capabilities:
Get common file path
Query environment variable

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x410
mov eax, dword [0x10069700]
xor eax, esp
mov dword [esp + 0x40c], eax
cmp dword [edi + 8], 0
push ebx
push esi
je 0x10021f4b
cmp dword [edi + 0x14], 0
je 0x10021c35
mov eax, 1
pop esi
pop ebx
mov ecx, dword [esp + 0x40c]
xor ecx, esp
call fcn.100282cc
mov esp, ebp
pop ebp
ret
xor ebx, ebx
test byte [edi + 0x1c], 0x10
je 0x10021f1e
push 0x1000
call fcn.10029186
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x10021c72
push 8
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop esi
pop ebx
mov ecx, dword [esp + 0x40c]
xor ecx, esp
call fcn.100282cc
mov esp, ebp
pop ebp
ret
mov byte [ebx], 0
mov eax, dword [edi + 0x18]
test eax, eax
je 0x10021c9e
push eax
push 0x1000
push ebx
call fcn.1002a466
add esp, 0xc
push 0x1005e330
push 0x1000
push ebx
call fcn.1002a466
add esp, 0xc
push 0x1005e334
push 0x1000
push ebx
call fcn.1002a466
add esp, 0xc
lea eax, [esp + 0x10]
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x10021cf3
lea ecx, [esp + 0x10]
push ecx
push 0x1000
push ebx
mov byte [esp + 0x41b], 0
call fcn.1002a466
add esp, 0xc
push 0x1005e330
push 0x1000
push ebx
call fcn.1002a466
add esp, 0xc
push 0x400
lea edx, [esp + 0x14]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x10021d9c
lea eax, [esp + 0x10]
mov byte [esp + 0x40f], 0
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10021d20
sub eax, edx
lea ecx, [esp + eax + 0xf]
lea eax, [esp + 0x10]
cmp ecx, eax
jb 0x10021d51
mov al, byte [ecx]
cmp al, 0x5c
je 0x10021d4e
cmp al, 0x2f
je 0x10021d4e
cmp al, 0x3a
je 0x10021d4e
dec ecx
lea edx, [esp + 0x10]
cmp ecx, edx
jae 0x10021d35
jmp 0x10021d51
mov byte [ecx], 0
lea eax, [esp + 0x10]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10021d58
sub eax, edx
je 0x10021d9c
lea eax, [esp + 0x10]
push eax
push 0x1000
push ebx
call fcn.1002a466
add esp, 0xc
push str.Symbol
push 0x1000
push ebx
call fcn.1002a466
add esp, 0xc
push 0x1005e330
push 0x1000
push ebx
call fcn.1002a466
add esp, 0xc
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
push 0x400
lea ecx, [esp + 0x14]
push ecx
push str._NT_SYMBOL_PATH
call esi
test eax, eax
je 0x10021de5
lea edx, [esp + 0x10]
push edx
push 0x1000
push ebx
mov byte [esp + 0x41b], 0
call fcn.1002a466
add esp, 0xc
push 0x1005e330
push 0x1000
push ebx
call fcn.1002a466
add esp, 0xc
push 0x400
lea eax, [esp + 0x14]
push eax
push str._NT_ALTERNATE_SYMBOL_PATH
call esi
test eax, eax
je 0x10021e28
lea ecx, [esp + 0x10]
push ecx
push 0x1000
push ebx
mov byte [esp + 0x41b], 0
call fcn.1002a466
add esp, 0xc
push 0x1005e330
push 0x1000
push ebx
call fcn.1002a466
add esp, 0xc
push 0x400
lea edx, [esp + 0x14]
push edx
push str.SYSTEMROOT
call esi
test eax, eax
je 0x10021ea8
lea eax, [esp + 0x10]
push eax
push 0x1000
push ebx
mov byte [esp + 0x41b], 0
call fcn.1002a466
add esp, 0xc
push 0x1005e330
push 0x1000
push ebx
call fcn.1002a466
add esp, 0xc
push str._system32
lea ecx, [esp + 0x14]
push 0x400
push ecx
call fcn.1002a466
add esp, 0xc
lea edx, [esp + 0x10]
push edx
push 0x1000
push ebx
call fcn.1002a466
add esp, 0xc
push 0x1005e330
push 0x1000
push ebx
call fcn.1002a466
add esp, 0xc
test byte [edi + 0x1c], 0x10
je 0x10021f1e
push 0x400
lea eax, [esp + 0x14]
push eax
push str.SYSTEMDRIVE
call esi
test eax, eax
je 0x10021f0b
push str.SRV
push 0x1000
push ebx
mov byte [esp + 0x41b], 0
call fcn.1002a466
add esp, 0xc
lea ecx, [esp + 0x10]
push ecx
push 0x1000
push ebx
call fcn.1002a466
add esp, 0xc
push str.mss
push 0x1000
push ebx
call fcn.1002a466
add esp, 0xc
push str.http:__msdl.microsoft.com_download_symbols_
jmp 0x10021f10
push str.SRVC:msshttp:__msdl.microsoft.com_download_symbols_
push 0x1000
push ebx
call fcn.1002a466
add esp, 0xc
mov esi, dword [edi + 8]
push ebx
call fcn.10020ee0
mov esi, eax
test ebx, ebx
je 0x10021f36
push ebx
call fcn.10028891
add esp, 4
test esi, esi
jne 0x10021f6c
mov edx, dword [edi]
mov eax, dword [edx + 0x10]
push esi
push esi
push esi
push str.Error_while_initializing_dbghelp.dll
mov ecx, edi
call eax
push 0x45a
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop esi
pop ebx
mov ecx, dword [esp + 0x40c]
xor ecx, esp
call fcn.100282cc
mov esp, ebp
pop ebp
ret
mov ebx, dword [edi + 0xc]
mov esi, dword [edi + 8]
mov edx, dword [edi + 0x10]
push esi
mov ecx, ebx
call fcn.100212a0
test eax, eax
je 0x10021f88
mov eax, 1
jmp 0x10021f92
push esi
call fcn.10021440
test eax, eax
je 0x10021f99
mov dword [edi + 0x14], 1
mov ecx, dword [esp + 0x414]
pop esi
pop ebx
xor ecx, esp
call fcn.100282cc
mov esp, ebp
pop ebp
ret