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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x5ac
mov eax, dword [0x103f058]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
mov edi, dword [ebp + 8]
push dword [edi]
lea eax, [ebp - 0x20c]
push dword [0x103f06c]
xor esi, esi
push 0x1006e4c
push 0x103
push eax
mov dword [ebp - 0x5a0], esi
mov dword [ebp - 0x5ac], esi
call fcn.01027f64
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 0x1038a7c
push ebx
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 0x1008f0c
push dword [ebp - 0x5a0]
mov ebx, 0x208
mov dword [ebp - 0x598], 1
mov dword [ebp - 0x59c], ebx
call esi
test eax, eax
jne 0x1038543
cmp dword [ebp - 0x598], 1
je 0x10384ab
cmp dword [ebp - 0x598], 2
jne 0x1038543
lea eax, [ebp - 0x20c]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x10384b4
sub eax, edx
sar eax, 1
cmp eax, 5
jbe 0x1038543
cmp dword [ebp - 0x598], 2
jne 0x1038511
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 0x1038a6f
lea eax, [ebp - 0x414]
push eax
push 0x104
lea eax, [ebp - 0x20c]
push eax
call fcn.01027e68
test eax, eax
jl 0x1038a6f
push 1
push 0x104
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x20c]
push eax
call fcn.0103c444
test eax, eax
jl 0x1038543
lea eax, [ebp - 0x414]
push eax
call fcn.0102e8b9
test eax, eax
je 0x1038a6f
lea eax, [ebp - 0x59c]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x598]
push eax
push 0
push 0x1008ef4
push dword [ebp - 0x5a0]
mov dword [ebp - 0x59c], ebx
call esi
test eax, eax
jne 0x103858a
cmp dword [ebp - 0x598], 1
jne 0x103858a
lea eax, [ebp - 0x20c]
push eax
lea eax, [edi + 0x20]
push eax
call fcn.0102fd0e
lea eax, [ebp - 0x59c]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x598]
push eax
push 0
push 0x1008ed4
push dword [ebp - 0x5a0]
mov dword [ebp - 0x59c], ebx
call esi
test eax, eax
jne 0x10385e2
cmp dword [ebp - 0x598], 1
jne 0x10385e2
lea eax, [ebp - 0x20c]
push 0x1001e30
push eax
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x10385e2
mov dword [edi + 0x34], 1
jmp 0x10385e6
and dword [edi + 0x34], 0
lea eax, [ebp - 0x59c]
push eax
push dword [edi + 4]
lea eax, [ebp - 0x598]
push eax
push 0
push 0x1001b94
push dword [ebp - 0x5a0]
mov dword [ebp - 0x59c], ebx
call esi
test eax, eax
jne 0x1038629
cmp dword [ebp - 0x598], 1
jne 0x1038629
lea eax, [ebp - 0x20c]
push eax
lea eax, [edi + 4]
push eax
call fcn.0102fd0e
lea eax, [ebp - 0x59c]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x598]
push eax
push 0
push 0x1008eb4
push dword [ebp - 0x5a0]
mov dword [ebp - 0x59c], ebx
call esi
test eax, eax
jne 0x1038a6f
cmp dword [ebp - 0x598], 1
je 0x1038671
cmp dword [ebp - 0x598], 2
jne 0x1038a6f
lea eax, [ebp - 0x20c]
push eax
lea eax, [edi + 0x1c]
push eax
call fcn.0102fd0e
test eax, eax
jne 0x1038a6f
lea eax, [ebp - 0x59c]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x598]
push eax
push 0
push 0x1008e88
push dword [ebp - 0x5a0]
mov dword [ebp - 0x59c], ebx
call esi
test eax, eax
jne 0x1038a6f
cmp dword [ebp - 0x598], 1
jne 0x1038a6f
lea eax, [ebp - 0x20c]
push eax
lea eax, [edi + 0x14]
push eax
call fcn.0102fd0e
test eax, eax
jne 0x1038a6f
lea eax, [ebp - 0x59c]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x598]
push eax
push 0
push 0x1008e58
push dword [ebp - 0x5a0]
mov dword [ebp - 0x59c], ebx
call esi
test eax, eax
jne 0x1038774
cmp dword [ebp - 0x598], 1
jne 0x1038774
push 0x40
pop eax
mov word [ebp - 0x414], ax
push 0x103
lea eax, [ebp - 0x412]
push eax
call fcn.0102fc69
test eax, eax
je 0x1038774
push 0x1008e50
push 0x104
lea eax, [ebp - 0x414]
push eax
call fcn.01027edd
lea eax, [ebp - 0x20c]
push eax
push 0x104
lea eax, [ebp - 0x414]
push eax
call fcn.01027edd
lea eax, [ebp - 0x414]
push eax
lea eax, [edi + 0x18]
push eax
call fcn.0102fd0e
lea eax, [ebp - 0x59c]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x598]
push eax
push 0
push 0x1008e30
push dword [ebp - 0x5a0]
mov dword [ebp - 0x59c], ebx
call esi
test eax, eax
jne 0x10387bb
cmp dword [ebp - 0x598], 1
jne 0x10387bb
lea eax, [ebp - 0x20c]
push eax
lea eax, [edi + 0xc]
push eax
call fcn.0102fd0e
lea eax, [ebp - 0x59c]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x598]
push eax
push 0
push 0x1006dd0
push dword [ebp - 0x5a0]
mov dword [ebp - 0x59c], ebx
call esi
test eax, eax
jne 0x1038802
cmp dword [ebp - 0x598], 1
jne 0x1038802
lea eax, [ebp - 0x20c]
push eax
lea eax, [edi + 0x10]
push eax
call fcn.0102fd0e
lea eax, [ebp - 0x59c]
push eax
lea eax, [ebp - 0x594]
push eax
lea eax, [ebp - 0x598]
push eax
push 0
push 0x1008d6c
push dword [ebp - 0x5a0]
mov dword [ebp - 0x59c], 0x100
call esi
test eax, eax
jne 0x103887a
cmp dword [ebp - 0x598], 1
jne 0x103887a
lea eax, [ebp - 0x594]
push eax
push 0x10412d8
push 0x1005b1c
lea eax, [ebp - 0x494]
push 0x143
push eax
call fcn.01027f64
add esp, 0x14
lea eax, [ebp - 0x494]
push eax
lea eax, [edi + 0x30]
push eax
call fcn.0102fd0e
test eax, eax
jne 0x1038a6f
lea eax, [ebp - 0x59c]
push eax
lea eax, [ebp - 0x594]
push eax
lea eax, [ebp - 0x598]
push eax
push 0
push 0x1008e0c
push dword [ebp - 0x5a0]
mov dword [ebp - 0x59c], 0x100
call esi
test eax, eax
jne 0x1038901
cmp dword [ebp - 0x598], 1
jne 0x1038901
lea eax, [ebp - 0x594]
push eax
call fcn.010313bf
test eax, eax
je 0x10388f3
lea eax, [ebp - 0x594]
push eax
push 0x10412d8
push 0x1005b1c
lea eax, [ebp - 0x494]
push 0x143
push eax
call fcn.01027f64
add esp, 0x14
lea eax, [ebp - 0x494]
push eax
jmp 0x10388f8
push 0x1002720
lea eax, [edi + 0x2c]
push eax
call fcn.0102fd0e
lea eax, [ebp - 0x59c]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x598]
push eax
push 0
push 0x10042c4
push dword [ebp - 0x5a0]
mov dword [ebp - 0x59c], ebx
call esi
test eax, eax
jne 0x1038938
cmp dword [ebp - 0x598], 1
je 0x103896f
lea eax, [ebp - 0x59c]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x598]
push eax
push 0
push 0x10042a0
push dword [ebp - 0x5a0]
mov dword [ebp - 0x59c], ebx
call esi
test eax, eax
jne 0x103898c
cmp dword [ebp - 0x598], 1
jne 0x103898c
lea eax, [ebp - 0x20c]
push eax
lea eax, [edi + 8]
push eax
call fcn.0102fd0e
test eax, eax
jne 0x1038a6f
jmp 0x1038a0f
mov eax, dword [edi]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x1038991
sub eax, edx
sar eax, 1
add eax, 0xb
xor ecx, ecx
push 2
pop edx
mov dword [ebp - 0x5a8], eax
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.msvcrt.dll_void____cdecl_operator_new___unsigned_int_
pop ecx
mov dword [ebp - 0x5a4], eax
test eax, eax
je 0x1038a6f
mov ecx, dword [edi]
inc ecx
inc ecx
push ecx
push dword [ebp - 0x5a8]
push eax
call fcn.01027e68
push 0x1008e00
push dword [ebp - 0x5a8]
push dword [ebp - 0x5a4]
call fcn.01027edd
push dword [ebp - 0x5a4]
mov ecx, edi
call fcn.01031322
test eax, eax
jne 0x1038a6f
push dword [ebp - 0x5a4]
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
pop ecx
lea eax, [ebp - 0x59c]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x598]
push eax
push 0
push 0x1008dec
push dword [ebp - 0x5a0]
mov dword [ebp - 0x59c], ebx
call esi
xor esi, esi
inc esi
test eax, eax
jne 0x1038a65
cmp dword [ebp - 0x598], esi
jne 0x1038a65
lea eax, [ebp - 0x20c]
push 0x1001e30
push eax
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x1038a65
mov dword [edi + 0x38], esi
jmp 0x1038a69
and dword [edi + 0x38], 0
mov dword [ebp - 0x5ac], esi
push dword [ebp - 0x5a0]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop ebx
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x5ac]
pop edi
xor ecx, ebp
pop esi
call fcn.0102df7d
leave
ret 4