Function at 0x100162fe
Capabilities:
Query environment variable

Disassembly:
mov eax, 0x10143b81
call fcn.1014399c
sub esp, 0x50
push ebx
push esi
mov esi, ecx
xor ebx, ebx
mov dword [ebp - 0x24], ebx
mov eax, edx
xor ecx, ecx
mov dword [ebp - 0x28], eax
push edi
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], ebx
mov dword [ebp - 0x2c], esi
mov word [esi], cx
xor edi, edi
mov dword [ebp - 4], ebx
inc edi
mov ecx, esi
push eax
mov dword [ebp - 0x24], edi
call fcn.1001416c
mov eax, dword [0x105d8a50]
test al, 1
jne 0x10016364
or eax, edi
mov dword [0x105d8a50], eax
push 0xa9bb
mov dword [ebp - 4], edi
call fcn.10018e4c
pop ecx
mov word [0x105d9df8], ax
mov byte [ebp - 4], bl
mov dword [ebp - 0x14], 0x3248c66
lea ecx, [ebp - 0x44]
mov dword [ebp - 0x20], 0xba6b42be
mov dword [ebp - 0x20], 0x551fa4c8
push 4
call fcn.100141a5
mov dword [ebp - 0x20], 0x91c84132
mov dword [ebp - 0x20], 0x72d50fa8
mov dword [ebp - 0x20], 0xffffffff
mov dword [ebp - 0x20], 0x914a
mov dword [ebp - 0x18], ebx
jmp 0x100163b4
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x44]
mov dword [eax + ecx*4], 0x5bb08661
inc dword [ebp - 0x18]
cmp dword [ebp - 0x18], 4
jl 0x100163a4
mov eax, dword [ebp - 0x14]
xor ebx, ebx
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x14]
inc ecx
cmp ecx, eax
setge bl
xor edx, edx
sub ebx, dword [ebp - 0x14]
sub ebx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x14]
cmp ebx, 0x2717
setne dl
xor ecx, ecx
cmp edx, eax
setge cl
mov dword [ebp - 0x20], ecx
xor ecx, ecx
mov edx, dword [ebp - 0x20]
add edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x14]
cmp edx, eax
mov edx, 0x1215
setge cl
mov dword [ebp - 0x20], ecx
xor ecx, ecx
mov eax, dword [ebp - 0x20]
mov eax, dword [ebp - 0x14]
mov eax, dword [ebp - 0x14]
cmp eax, edx
mov edi, dword [ebp - 0x44]
setl cl
add ecx, dword [ebp - 0x14]
mov dword [edi + 8], edx
mov dword [ebp - 0x20], ecx
cmp dword [ebp - 0x20], 3
sbb edx, edx
xor ecx, ecx
inc edx
add edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x14]
cmp eax, 0xffffffff
setg cl
xor ebx, ebx
cmp ecx, edx
je 0x10016444
cmp dword [edi + 8], ebx
jne 0x10016444
xor edi, edi
mov eax, ebx
inc edi
jmp 0x10016449
xor edi, edi
inc edi
mov eax, edi
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x20], eax
mov byte [ebp - 0xd], bl
cmp byte [ebp - 0xd], 0
je 0x10016461
call dword [sym.imp.USER32.dll_WaitMessage]
push dword [ebp - 0x44]
call fcn.10123626
mov eax, dword [0x105d8a50]
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x3c], ebx
pop ecx
test al, 2
jne 0x1001649f
or eax, 2
mov dword [0x105d8a50], eax
push 0xdb9d
mov dword [ebp - 4], 2
call fcn.10018e4c
pop ecx
mov word [0x105d8a4c], ax
mov byte [ebp - 4], bl
mov dword [ebp - 0x1c], 0x68ec0ae9
mov dword [ebp - 0x20], 0xbf2d3f50
mov dword [ebp - 0x1c], 0x1b
jmp 0x10016502
mov dword [ebp - 0x14], 3
mov dword [ebp - 0x18], ebx
jmp 0x100164cc
mov eax, dword [ebp - 0x18]
mov dword [ebp + eax*4 - 0x5c], edi
inc dword [ebp - 0x18]
cmp dword [ebp - 0x18], 3
jl 0x100164c2
mov dword [ebp - 0x14], ebx
jmp 0x100164df
cmp dword [ebp - 0x14], ebx
jne 0x100164e5
inc dword [ebp - 0x14]
cmp dword [ebp - 0x14], 2
jle 0x100164d7
mov byte [ebp - 0xd], bl
cmp byte [ebp - 0xd], 0
je 0x100164ff
push 0x1769
push 0xe14
push ebx
call dword [sym.imp.USER32.dll_RemoveMenu]
dec dword [ebp - 0x1c]
cmp dword [ebp - 0x1c], 0xfffffffa
jg 0x100164b6
mov dword [ebp - 0x20], edi
mov edi, dword [ebp - 0x28]
test edi, edi
je 0x100166e0
call fcn.10015e25
push 0x34
pop ecx
xor edx, edx
div ecx
push 2
lea ecx, [ebp - 0x38]
mov ebx, edx
call fcn.100141a5
mov dword [ebp - 4], 3
xor edx, edx
mov dword [ebp - 0x20], 0xfffffff6
mov dword [ebp - 0x1c], edx
jmp 0x10016553
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x38]
mov dword [eax + ecx*4], 1
inc dword [ebp - 0x1c]
cmp dword [ebp - 0x1c], 2
jl 0x10016543
mov dword [ebp - 0x20], 1
cmp dword [ebp - 0x20], edx
jl 0x10016694
push 1
lea ecx, [ebp - 0x50]
call fcn.100141a5
xor edx, edx
mov dword [ebp - 0x1c], edx
jmp 0x1001658a
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x50]
mov dword [eax + ecx*4], 1
inc dword [ebp - 0x1c]
cmp dword [ebp - 0x1c], 1
jl 0x1001657a
mov eax, dword [ebp - 0x50]
mov dword [eax], edx
mov dword [ebp - 0x18], 0xffffffff
mov byte [ebp - 0xd], dl
cmp byte [ebp - 0xd], 0
je 0x100165b5
push edx
push edx
push 0x1cd2
push edx
call dword [sym.imp.USER32.dll_AppendMenuA]
xor edx, edx
mov dword [ebp - 0x18], 1
cmp dword [ebp - 0x18], edx
jl 0x1001666b
mov dword [ebp - 0x14], 0x5f0ed1ad
mov dword [ebp - 0x14], 1
cmp dword [ebp - 0x14], edx
jl 0x1001663c
mov dword [ebp - 0x1c], 0x498e64e6
mov byte [ebp - 0xd], dl
cmp byte [ebp - 0xd], 0
je 0x10016603
push 0x1ef3
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.USER32.dll_GetDC]
push eax
call dword [sym.imp.GDI32.dll_SetTextAlign]
xor edx, edx
mov dword [ebp - 0x1c], 1
cmp dword [ebp - 0x1c], edx
jl 0x10016637
mov byte [ebp - 0xd], dl
cmp byte [ebp - 0xd], 0
je 0x10016627
push edx
push 0x7fa
push edx
call dword [sym.imp.GDI32.dll_GetObjectW]
xor edx, edx
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x38]
cmp dword [eax + ecx*4], edx
jne 0x10016637
dec dword [ebp - 0x1c]
jns 0x1001660f
dec dword [ebp - 0x14]
jns 0x100165d8
mov dword [ebp - 0x14], edx
jmp 0x1001665c
mov byte [ebp - 0xd], dl
cmp byte [ebp - 0xd], 0
je 0x10016659
push 0x1aad
push edx
push edx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
xor edx, edx
inc dword [ebp - 0x14]
cmp dword [ebp - 0x14], 1
jle 0x10016641
dec dword [ebp - 0x18]
jns 0x100165c5
mov eax, dword [ebp - 0x50]
inc dword [eax]
cmp dword [eax], 1
jle 0x10016595
push eax
call fcn.10123626
xor edx, edx
mov dword [ebp - 0x50], edx
mov dword [ebp - 0x4c], edx
mov dword [ebp - 0x48], edx
dec dword [ebp - 0x20]
pop ecx
jns 0x10016569
mov byte [ebp - 4], dl
cmp dword [ebp - 0x38], 0
je 0x100166b1
push dword [ebp - 0x38]
call fcn.10123626
xor eax, eax
pop ecx
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
push 0x1a
pop ecx
cmp ebx, ecx
jge 0x100166c3
movzx edx, word [0x105d9df8]
add edx, ebx
jmp 0x100166d1
mov eax, ebx
cdq
idiv ecx
movzx eax, word [0x105d8a4c]
add edx, eax
push edx
mov ecx, esi
call fcn.1001413b
dec edi
jne 0x10016516
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret