Function at 0x10157e1
Capabilities:
Query environment variable

Disassembly:
push 0x14
mov eax, 0x101dad5
call fcn.01001448
mov edi, dword [ebp + 8]
mov ecx, dword [edi]
mov eax, ecx
lea esi, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x10157f7
sub eax, esi
sar eax, 1
mov dword [ebp - 0x10], eax
je 0x1015888
cmp eax, 8
jb 0x1015888
push 0x24
pop eax
cmp ax, word [ecx]
jne 0x1015888
push 0x28
pop eax
cmp ax, word [ecx + 2]
jne 0x1015888
push 0x40
pop eax
cmp ax, word [ecx + 4]
jne 0x1015888
mov ebx, dword [sym.imp.msvcrt.dll_wcschr]
push 0x2c
push ecx
call ebx
mov esi, eax
mov eax, dword [edi]
push 0x2d
push eax
call ebx
add esp, 0x10
mov dword [ebp - 0x14], eax
test esi, esi
je 0x1015888
test eax, eax
je 0x1015888
sub eax, esi
and eax, 0xfffffffe
cmp eax, 2
jne 0x1015888
sub esi, dword [edi]
xor ecx, ecx
sar esi, 1
sub esi, 3
push 2
lea ebx, [esi + 1]
pop edx
mov eax, ebx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.01001502
pop ecx
mov dword [ebp + 8], eax
and dword [ebp - 4], 0
test eax, eax
jne 0x1015893
push eax
call fcn.010014d2
pop ecx
xor eax, eax
inc eax
call fcn.0100165f
ret 4
mov eax, dword [edi]
push esi
add eax, 6
push eax
push ebx
push dword [ebp + 8]
call fcn.01004499
test eax, eax
jge 0x10158ac
push dword [ebp + 8]
jmp 0x1015882
mov eax, dword [edi]
mov ecx, dword [ebp - 0x14]
sub ecx, eax
mov eax, dword [ebp - 0x10]
sar ecx, 1
sub eax, ecx
mov esi, eax
xor ecx, ecx
push 2
lea ebx, [esi + 1]
pop edx
mov eax, ebx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.01001502
pop ecx
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x14]
push esi
add ecx, 2
push ecx
push ebx
push eax
mov byte [ebp - 4], 1
call fcn.01004499
mov dword [ebp - 0x1c], eax
test eax, eax
jge 0x1015906
push dword [ebp - 0x10]
call fcn.010014d2
push dword [ebp + 8]
call fcn.010014d2
pop ecx
jmp 0x1015887
mov esi, dword [ebp - 0x10]
push esi
call dword [sym.imp.msvcrt.dll__wtol]
pop ecx
mov dword [ebp - 0x18], eax
test eax, eax
jne 0x101591b
push esi
jmp 0x10158f6
push 0x208
call fcn.01001502
mov ebx, eax
pop ecx
mov dword [ebp - 0x14], ebx
mov byte [ebp - 4], 2
test ebx, ebx
jne 0x101594f
push eax
call fcn.010014d2
push esi
call fcn.010014d2
push dword [ebp + 8]
call fcn.010014d2
add esp, 0xc
jmp 0x1015888
push 0x103
push ebx
push dword [ebp + 8]
call dword [sym.imp.API_MS_Win_Core_ProcessEnvironment_L1_1_0.dll_ExpandEnvironmentStringsW]
test eax, eax
jne 0x1015965
push ebx
jmp 0x1015934
push 2
push 0
push ebx
call dword [sym.imp.API_MS_Win_Core_LibraryLoader_L1_1_0.dll_LoadLibraryExW]
mov esi, eax
test esi, esi
jne 0x1015981
push ebx
call fcn.010014d2
push dword [ebp - 0x10]
jmp 0x101593a
mov dword [ebp - 0x20], esi
push 0xa000
mov byte [ebp - 4], 3
call fcn.01001502
pop ecx
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x10159aa
push eax
call fcn.010014d2
pop ecx
push esi
call dword [sym.imp.API_MS_Win_Core_LibraryLoader_L1_1_0.dll_FreeLibrary]
jmp 0x1015976
push 0x4fff
push eax
push dword [ebp - 0x18]
push esi
call dword [sym.imp.USER32.dll_LoadStringW]
push dword [ebp - 0x14]
test eax, eax
je 0x101599b
mov ecx, edi
call fcn.0100bf79
push 0
call fcn.010014d2
pop ecx
push esi
call dword [sym.imp.API_MS_Win_Core_LibraryLoader_L1_1_0.dll_FreeLibrary]
push ebx
call fcn.010014d2
push dword [ebp - 0x10]
call fcn.010014d2
push dword [ebp + 8]
call fcn.010014d2
mov eax, dword [ebp - 0x1c]
add esp, 0xc
jmp 0x101588b