Function at 0x1041134
Capabilities:
Query environment variable
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x5a8
mov eax, dword [0x1046190]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push dword [ebx]
lea eax, [ebp - 0x20c]
push dword [0x10472a0]
xor esi, esi
push 0x10078dc
push 0x103
push eax
mov dword [ebp - 0x5a0], esi
mov dword [ebp - 0x5a8], esi
call fcn.01028b64
add esp, 0x14
lea eax, [ebp - 0x5a0]
push eax
push 0x20019
push esi
lea eax, [ebp - 0x20c]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x10417d8
push edi
lea eax, [ebp - 0x59c]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x598]
push eax
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push 0x1009ba0
push dword [ebp - 0x5a0]
mov edi, 0x208
mov dword [ebp - 0x598], 1
mov dword [ebp - 0x59c], edi
call esi
test eax, eax
jne 0x1041299
cmp dword [ebp - 0x598], 1
je 0x1041201
cmp dword [ebp - 0x598], 2
jne 0x1041299
lea eax, [ebp - 0x20c]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x104120a
sub eax, edx
sar eax, 1
cmp eax, 5
jbe 0x1041299
cmp dword [ebp - 0x598], 2
jne 0x1041267
push 0x104
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x10417cb
lea eax, [ebp - 0x414]
push eax
push 0x104
lea eax, [ebp - 0x20c]
push eax
call fcn.01028a67
test eax, eax
jl 0x10417cb
push 1
push 0x104
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x20c]
push eax
call fcn.01043e67
test eax, eax
jl 0x1041299
lea eax, [ebp - 0x414]
push eax
call fcn.010326f3
test eax, eax
je 0x10417cb
lea eax, [ebp - 0x59c]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x598]
push eax
push 0
push 0x1009c54
push dword [ebp - 0x5a0]
mov dword [ebp - 0x59c], edi
call esi
test eax, eax
jne 0x10412e0
cmp dword [ebp - 0x598], 1
jne 0x10412e0
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebx + 0x20]
push eax
call fcn.01033d95
lea eax, [ebp - 0x59c]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x598]
push eax
push 0
push 0x100cdb4
push dword [ebp - 0x5a0]
mov dword [ebp - 0x59c], edi
call esi
test eax, eax
jne 0x1041338
cmp dword [ebp - 0x598], 1
jne 0x1041338
lea eax, [ebp - 0x20c]
push 0x10024b0
push eax
call dword [sym.imp.msvcrt.dll__wcsicmp]
test eax, eax
pop ecx
pop ecx
jne 0x1041338
mov dword [ebx + 0x34], 1
jmp 0x104133c
and dword [ebx + 0x34], 0
lea eax, [ebp - 0x59c]
push eax
push dword [ebx + 4]
lea eax, [ebp - 0x598]
push eax
push 0
push 0x10021cc
push dword [ebp - 0x5a0]
mov dword [ebp - 0x59c], edi
call esi
test eax, eax
jne 0x104137f
cmp dword [ebp - 0x598], 1
jne 0x104137f
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebx + 4]
push eax
call fcn.01033d95
lea eax, [ebp - 0x59c]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x598]
push eax
push 0
push 0x1009cc8
push dword [ebp - 0x5a0]
mov dword [ebp - 0x59c], edi
call esi
test eax, eax
jne 0x10417cb
cmp dword [ebp - 0x598], 1
je 0x10413c7
cmp dword [ebp - 0x598], 2
jne 0x10417cb
cmp dword [ebp - 0x598], 2
jne 0x1041411
push 0x104
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x10417cb
lea eax, [ebp - 0x414]
push eax
push 0x104
lea eax, [ebp - 0x20c]
push eax
call fcn.01028a67
test eax, eax
jl 0x10417cb
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebx + 0x1c]
push eax
call fcn.01033d95
test eax, eax
jne 0x10417cb
lea eax, [ebp - 0x59c]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x598]
push eax
push 0
push 0x1009d18
push dword [ebp - 0x5a0]
mov dword [ebp - 0x59c], edi
call esi
test eax, eax
jne 0x10417cb
cmp dword [ebp - 0x598], 1
jne 0x10417cb
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebx + 0x14]
push eax
call fcn.01033d95
test eax, eax
jne 0x10417cb
lea eax, [ebp - 0x59c]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x598]
push eax
push 0
push 0x1009ce8
push dword [ebp - 0x5a0]
mov dword [ebp - 0x59c], edi
call esi
test eax, eax
jne 0x1041513
cmp dword [ebp - 0x598], 1
jne 0x1041513
push 0x103
lea eax, [ebp - 0x412]
push eax
mov word [ebp - 0x414], 0x40
call fcn.01033bb5
test eax, eax
je 0x1041513
push 0x1009ad4
push 0x104
lea eax, [ebp - 0x414]
push eax
call fcn.01028adc
lea eax, [ebp - 0x20c]
push eax
push 0x104
lea eax, [ebp - 0x414]
push eax
call fcn.01028adc
lea eax, [ebp - 0x414]
push eax
lea eax, [ebx + 0x18]
push eax
call fcn.01033d95
lea eax, [ebp - 0x59c]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x598]
push eax
push 0
push 0x1009ca8
push dword [ebp - 0x5a0]
mov dword [ebp - 0x59c], edi
call esi
test eax, eax
jne 0x104155a
cmp dword [ebp - 0x598], 1
jne 0x104155a
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebx + 0xc]
push eax
call fcn.01033d95
lea eax, [ebp - 0x59c]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x598]
push eax
push 0
push 0x10044c8
push dword [ebp - 0x5a0]
mov dword [ebp - 0x59c], edi
call esi
test eax, eax
jne 0x10415a1
cmp dword [ebp - 0x598], 1
jne 0x10415a1
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebx + 0x10]
push eax
call fcn.01033d95
lea eax, [ebp - 0x59c]
push eax
lea eax, [ebp - 0x594]
push eax
lea eax, [ebp - 0x598]
push eax
push 0
push 0x1009c3c
push dword [ebp - 0x5a0]
mov dword [ebp - 0x59c], 0x100
call esi
test eax, eax
jne 0x1041619
cmp dword [ebp - 0x598], 1
jne 0x1041619
lea eax, [ebp - 0x594]
push eax
push 0x1048bf0
push 0x1007240
lea eax, [ebp - 0x494]
push 0x143
push eax
call fcn.01028b64
add esp, 0x14
lea eax, [ebp - 0x494]
push eax
lea eax, [ebx + 0x30]
push eax
call fcn.01033d95
test eax, eax
jne 0x10417cb
lea eax, [ebp - 0x59c]
push eax
lea eax, [ebp - 0x594]
push eax
lea eax, [ebp - 0x598]
push eax
push 0
push 0x1009bf0
push dword [ebp - 0x5a0]
mov dword [ebp - 0x59c], 0x100
call esi
test eax, eax
jne 0x10416a0
cmp dword [ebp - 0x598], 1
jne 0x10416a0
lea eax, [ebp - 0x594]
push eax
call fcn.010387a2
test eax, eax
je 0x1041692
lea eax, [ebp - 0x594]
push eax
push 0x1048bf0
push 0x1007240
lea eax, [ebp - 0x494]
push 0x143
push eax
call fcn.01028b64
add esp, 0x14
lea eax, [ebp - 0x494]
push eax
jmp 0x1041697
push 0x1002d58
lea eax, [ebx + 0x2c]
push eax
call fcn.01033d95
lea eax, [ebp - 0x59c]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x598]
push eax
push 0
push 0x1007890
push dword [ebp - 0x5a0]
mov dword [ebp - 0x59c], edi
call esi
test eax, eax
jne 0x10416f1
cmp dword [ebp - 0x598], 1
jne 0x10416f1
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebx + 8]
push eax
call fcn.01033d95
test eax, eax
jne 0x10417cb
jmp 0x104176b
mov eax, dword [ebx]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x10416f6
sub eax, edx
sar eax, 1
lea edi, [eax + 0xb]
xor ecx, ecx
push 2
pop edx
mov eax, edi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.msvcrt.dll_void____cdecl_operator_new___unsigned_int_
test eax, eax
pop ecx
mov dword [ebp - 0x5a4], eax
je 0x10417cb
mov ecx, dword [ebx]
inc ecx
inc ecx
push ecx
push edi
push eax
call fcn.01028a67
push 0x100cda8
push edi
push dword [ebp - 0x5a4]
call fcn.01028adc
push dword [ebp - 0x5a4]
mov ecx, ebx
call fcn.01038705
test eax, eax
jne 0x10417cb
push dword [ebp - 0x5a4]
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
pop ecx
mov edi, 0x208
lea eax, [ebp - 0x59c]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x598]
push eax
push 0
push 0x100cd94
push dword [ebp - 0x5a0]
mov dword [ebp - 0x59c], edi
call esi
xor esi, esi
inc esi
test eax, eax
jne 0x10417c1
cmp dword [ebp - 0x598], esi
jne 0x10417c1
lea eax, [ebp - 0x20c]
push 0x10024b0
push eax
call dword [sym.imp.msvcrt.dll__wcsicmp]
test eax, eax
pop ecx
pop ecx
jne 0x10417c1
mov dword [ebx + 0x38], esi
jmp 0x10417c5
and dword [ebx + 0x38], 0
mov dword [ebp - 0x5a8], esi
push dword [ebp - 0x5a0]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x5a8]
pop esi
xor ecx, ebp
pop ebx
call fcn.01031a01
leave
ret 4