Function at 0x1001b390
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.1001ab20
test al, al
jne 0x1001b554
push SysReAllocStringLen
mov ecx, edi
call fcn.1001b050
cmp al, 1
je 0x1001b554
push reloc.OLEAUT32.dll_SysReAllocString
mov ecx, edi
call fcn.1001b050
cmp al, 1
je 0x1001b554
lea eax, [edi + 8]
xor bl, bl
cmp dword [eax + 0x14], 8
jb 0x1001b3ea
mov eax, dword [eax]
push eax
call fcn.1009e1b1
mov esi, eax
add esp, 4
test esi, esi
je 0x1001b530
push 0x40
mov dword [ebp - 0x248], 0
call fcn.10022ba0
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 0x1001b473
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.1001b7f0
add esp, 0xc
test eax, eax
setne bh
cmp dword [ebp - 0x22c], 8
jb 0x1001b4c5
push dword [ebp - 0x240]
call fcn.10022bc0
xor eax, eax
mov dword [ebp - 0x230], 0
cmp dword [ebp - 0x214], 8
mov dword [ebp - 0x22c], 7
mov word [ebp - 0x240], ax
jb 0x1001b4f6
push dword [ebp - 0x228]
call fcn.10022bc0
test bh, bh
je 0x1001b50a
lea eax, [ebp - 0x24c]
mov ecx, edi
push eax
call fcn.1001a4a0
mov bl, 1
mov eax, dword [ebp - 0x24c]
push dword [eax + 4]
lea eax, [ebp - 0x24c]
push eax
mov ecx, eax
call fcn.10018160
push dword [ebp - 0x24c]
call fcn.10022bc0
test bl, bl
jne 0x1001b554
push 0
push str.File
xor bl, bl
call fcn.10026950
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 0x1001b5b0
cmp dword [ebx + 0x14], 8
mov eax, ebx
jb 0x1001b56e
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 0x1001b590
sub ecx, edx
lea eax, [ebp - 0x210]
sar ecx, 1
push ecx
push eax
mov ecx, ebx
call fcn.10007720
jmp 0x1001b5d5
push ebx
mov ecx, edi
call fcn.1001b240
cmp dword [edi + 0x1c], 8
lea ecx, [edi + 8]
mov byte [ebp - 0x241], al
jb 0x1001b5ca
mov ecx, dword [edi + 8]
push dword [edi + 0x18]
push ecx
mov ecx, ebx
call fcn.1000afa0
push ebx
call fcn.1001a7d0
mov al, byte [ebp - 0x241]
add esp, 4
cmp al, 1
jne 0x1001b71c
cmp byte [edi + 0x3e], al
jne 0x1001b68d
mov ecx, dword [0x100fe6e8]
test ecx, ecx
jne 0x1001b671
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.10022520
add esp, 0x24
mov ecx, 0x100fe6d8
push eax
call fcn.10019820
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.100212a0
push ebx
lea ecx, [ebp - 0x228]
call fcn.10018b80
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 0x1001b6b0
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.100269a0
push 1
push str.File
call fcn.10026950
push dword [edi + 0x38]
push str.File
call fcn.100269f0
add esp, 0x14
cmp dword [ebp - 0x214], 8
jb 0x1001b716
push dword [ebp - 0x228]
call fcn.10022bc0
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