Function at 0x112b420
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20c
push ebx
push esi
mov esi, dword [ebp + 8]
mov eax, dword [esi]
mov eax, dword [eax]
push edi
push 0x100cdfc
add eax, 0x7a8c
push 0x100b744
push eax
call fcn.0107e5b0
mov edi, eax
test edi, edi
je 0x112b4a7
lea eax, [esi + 0x420]
test eax, eax
je 0x112b46a
push 0x103
push edi
push eax
call dword [sym.imp.msvcrt.dll_wcsncpy]
add esp, 0xc
cmp word [edi], 0
mov eax, edi
je 0x112b47b
add eax, 2
cmp word [eax], 0
jne 0x112b472
mov edx, dword [esi]
lea ecx, [esi + 0x303ec]
push ecx
sub eax, edi
push 0x1078d10
sar eax, 1
push eax
mov eax, dword [edx]
push edi
push eax
call fcn.0102bdc0
push edi
push 0
call dword [sym.imp.KERNEL32.DLL_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.DLL_HeapFree]
push 0x20a
lea ecx, [ebp - 0x20c]
push 0
push ecx
call sub.msvcrt.dll_memset
mov edx, dword [esi]
mov eax, dword [edx]
add esp, 0xc
cmp dword [eax + 0x819c], 6
jb 0x112b4e5
movzx eax, word [eax + 0x7eb4]
push eax
push 0x1021984
push 0x103
lea ecx, [ebp - 0x20c]
push ecx
jmp 0x112b4fe
movzx edx, word [eax + 0x7eb4]
push edx
push 0x1021968
push 0x103
lea eax, [ebp - 0x20c]
push eax
call fcn.0102aaf0
lea eax, [esi + 0x62a]
add esp, 0x10
test eax, eax
je 0x112b526
push 0x103
lea ecx, [ebp - 0x20c]
push ecx
push eax
call dword [sym.imp.msvcrt.dll_wcsncpy]
add esp, 0xc
cmp word [ebp - 0x20c], 0
lea eax, [ebp - 0x20c]
je 0x112b53f
add eax, 2
cmp word [eax], 0
jne 0x112b536
lea ecx, [ebp - 0x20c]
lea edx, [esi + 0x303f4]
push edx
sub eax, ecx
push 0x1078d10
sar eax, 1
push eax
mov eax, dword [esi]
mov edx, ecx
mov ecx, dword [eax]
push edx
push ecx
call fcn.0102bdc0
push 0x20a
lea edx, [ebp - 0x20c]
push 0
push edx
call sub.msvcrt.dll_memset
add esp, 0xc
push 0x103
lea eax, [ebp - 0x20c]
push eax
push 0x101065c
call dword [sym.imp.KERNEL32.DLL_ExpandEnvironmentStringsW]
test eax, eax
je 0x112b5f1
lea eax, [esi + 0x216]
test eax, eax
je 0x112b5b4
push 0x103
lea ecx, [ebp - 0x20c]
push ecx
push eax
call dword [sym.imp.msvcrt.dll_wcsncpy]
add esp, 0xc
cmp word [ebp - 0x20c], 0
lea eax, [ebp - 0x20c]
je 0x112b5cd
add eax, 2
cmp word [eax], 0
jne 0x112b5c4
lea ecx, [ebp - 0x20c]
lea edx, [esi + 0x303e8]
push edx
sub eax, ecx
push 0x1078d10
sar eax, 1
push eax
mov eax, dword [esi]
mov edx, ecx
mov ecx, dword [eax]
push edx
push ecx
call fcn.0102bdc0
mov edx, dword [esi]
mov edi, dword [edx]
push 0x2000
call fcn.010284a0
lea ebx, [eax*4 + 8]
lea eax, [ebx + edi]
push eax
call dword [sym.imp.KERNEL32.DLL_InterlockedIncrement]
push 0
push 1
push 0x2000
push edi
call fcn.010b1980
push 0x20a
lea ecx, [ebp - 0x20c]
push 0
push ecx
call sub.msvcrt.dll_memset
mov edx, dword [esi]
mov eax, dword [edx]
mov edx, dword [eax + 0x224]
add esp, 0xc
lea ecx, [ebp - 0x20c]
push ecx
push 1
push 0
push 0x21
push 0
call edx
cmp byte [ebp - 0x20c], 0
je 0x112b67d
push esi
push 0x112b270
lea eax, [ebp - 0x20c]
push eax
call fcn.0102a730
mov edx, dword [esi]
push eax
mov eax, dword [edx]
lea ecx, [ebp - 0x20c]
push ecx
push eax
call fcn.0102bdc0
push 0x20a
lea ecx, [ebp - 0x20c]
push 0
push ecx
call sub.msvcrt.dll_memset
mov edx, dword [esi]
mov eax, dword [edx]
mov edx, dword [eax + 0x224]
add esp, 0xc
lea ecx, [ebp - 0x20c]
push ecx
push 1
push 0
push 0x20
push 0
call edx
cmp byte [ebp - 0x20c], 0
je 0x112b6fe
lea eax, [esi + 0xc]
test eax, eax
je 0x112b6d4
push 0x103
lea ecx, [ebp - 0x20c]
push ecx
push eax
call dword [sym.imp.msvcrt.dll_wcsncpy]
add esp, 0xc
lea edx, [esi + 0x303f0]
push edx
push 0x1078d10
lea eax, [ebp - 0x20c]
push eax
call fcn.0102a730
mov edx, dword [esi]
push eax
mov eax, dword [edx]
lea ecx, [ebp - 0x20c]
push ecx
push eax
call fcn.0102bdc0
mov ecx, dword [esi]
mov edx, dword [ecx]
add edx, ebx
push edx
call dword [sym.imp.KERNEL32.DLL_InterlockedDecrement]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4