Function at 0x1001b380
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24c
mov eax, dword [0x100ffa04]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
call fcn.1001ab10
test al, al
jne 0x1001b544
push SysReAllocStringLen
mov ecx, edi
call fcn.1001b040
cmp al, 1
je 0x1001b544
push reloc.OLEAUT32.dll_SysReAllocString
mov ecx, edi
call fcn.1001b040
cmp al, 1
je 0x1001b544
lea eax, [edi + 8]
xor bl, bl
cmp dword [eax + 0x14], 8
jb 0x1001b3da
mov eax, dword [eax]
push eax
call fcn.1009e1b1
mov esi, eax
add esp, 4
test esi, esi
je 0x1001b520
push 0x40
mov dword [ebp - 0x248], 0
call fcn.10022b90
push 1
push 0x100c0364
lea ecx, [ebp - 0x228]
mov dword [ebp - 0x218], 0
mov dword [eax], eax
mov dword [eax + 4], eax
mov dword [eax + 8], eax
mov word [eax + 0xc], 0x101
mov dword [ebp - 0x24c], eax
xor eax, eax
mov dword [ebp - 0x214], 7
mov word [ebp - 0x228], ax
call fcn.10007720
mov ecx, esi
mov dword [ebp - 0x230], 0
xor eax, eax
mov dword [ebp - 0x22c], 7
mov word [ebp - 0x240], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1001b463
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x240]
call fcn.10007720
lea eax, [ebp - 0x24c]
push eax
lea eax, [ebp - 0x228]
push eax
lea eax, [ebp - 0x240]
push eax
call fcn.1001b7e0
add esp, 0xc
test eax, eax
setne bh
cmp dword [ebp - 0x22c], 8
jb 0x1001b4b5
push dword [ebp - 0x240]
call fcn.10022bb0
xor eax, eax
mov dword [ebp - 0x230], 0
cmp dword [ebp - 0x214], 8
mov dword [ebp - 0x22c], 7
mov word [ebp - 0x240], ax
jb 0x1001b4e6
push dword [ebp - 0x228]
call fcn.10022bb0
test bh, bh
je 0x1001b4fa
lea eax, [ebp - 0x24c]
mov ecx, edi
push eax
call fcn.1001a490
mov bl, 1
mov eax, dword [ebp - 0x24c]
push dword [eax + 4]
lea eax, [ebp - 0x24c]
push eax
mov ecx, eax
call fcn.10018150
push dword [ebp - 0x24c]
call fcn.10022bb0
test bl, bl
jne 0x1001b544
push 0
push str.File
xor bl, bl
call fcn.10026940
add esp, 8
mov al, bl
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1008aaed
mov esp, ebp
pop ebp
ret
cmp dword [edi + 0x30], 0
lea ebx, [edi + 0x20]
mov byte [ebp - 0x241], 1
jbe 0x1001b5a0
cmp dword [ebx + 0x14], 8
mov eax, ebx
jb 0x1001b55e
mov eax, dword [ebx]
push 0x104
lea ecx, [ebp - 0x210]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea ecx, [ebp - 0x210]
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1001b580
sub ecx, edx
lea eax, [ebp - 0x210]
sar ecx, 1
push ecx
push eax
mov ecx, ebx
call fcn.10007720
jmp 0x1001b5c5
push ebx
mov ecx, edi
call fcn.1001b230
cmp dword [edi + 0x1c], 8
lea ecx, [edi + 8]
mov byte [ebp - 0x241], al
jb 0x1001b5ba
mov ecx, dword [edi + 8]
push dword [edi + 0x18]
push ecx
mov ecx, ebx
call fcn.1000afa0
push ebx
call fcn.1001a7c0
mov al, byte [ebp - 0x241]
add esp, 4
cmp al, 1
jne 0x1001b70c
cmp byte [edi + 0x3e], al
jne 0x1001b67d
mov ecx, dword [0x100fe6e8]
test ecx, ecx
jne 0x1001b661
lea eax, [ebp - 0x24c]
push eax
call fcn.1009e5dd
lea eax, [ebp - 0x24c]
push eax
call fcn.1009e5b6
add esp, 8
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcessId]
push eax
push dword [esi]
mov eax, dword [esi + 0x14]
push dword [esi + 4]
add eax, 0x76c
push dword [esi + 8]
push dword [esi + 0xc]
push dword [esi + 0x10]
push eax
lea eax, [ebp - 0x240]
push str._04d__02d__02d__02d__02d__02d_pid__d__
push eax
call fcn.10022510
add esp, 0x24
mov ecx, 0x100fe6d8
push eax
call fcn.10019810
lea ecx, [ebp - 0x240]
call fcn.10006a50
mov ecx, dword [0x100fe6e8]
cmp dword [0x100fe6ec], 8
mov eax, 0x100fe6d8
push ecx
cmovae eax, dword [0x100fe6d8]
mov ecx, ebx
push eax
call fcn.1000afa0
push ebx
call fcn.10021290
push ebx
lea ecx, [ebp - 0x228]
call fcn.10018b70
mov edx, dword [str.mft_trace.txt]
mov ecx, edx
lea esi, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1001b6a0
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x228]
call fcn.1000afa0
cmp dword [ebp - 0x214], 8
lea eax, [ebp - 0x228]
cmovae eax, dword [ebp - 0x228]
push eax
call fcn.10026990
push 1
push str.File
call fcn.10026940
push dword [edi + 0x38]
push str.File
call fcn.100269e0
add esp, 0x14
cmp dword [ebp - 0x214], 8
jb 0x1001b706
push dword [ebp - 0x228]
call fcn.10022bb0
mov al, byte [ebp - 0x241]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1008aaed
mov esp, ebp
pop ebp
ret