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

Disassembly:
push 0x964
mov eax, 0x438c7d
call fcn.0043869b
mov dword [ebp - 0x958], edx
mov ebx, ecx
mov al, byte [ebp + 8]
xor ecx, ecx
mov byte [ebp - 0x926], al
mov dword [ebp - 0x954], ecx
mov byte [ebp - 0x92d], cl
mov byte [ebp - 0x925], cl
mov dword [ebp - 0x92c], ecx
mov dword [ebp - 4], ecx
mov dword [ebp - 0x940], ecx
mov dword [ebp - 0x924], ecx
or dword [ebp - 0x950], 0xffffffff
mov edi, ecx
movzx eax, al
mov dword [ebp - 0x96c], eax
mov byte [ebp - 4], 2
mov dword [ebp - 0x93c], ecx
mov dword [ebp - 0x94c], edi
sub eax, ecx
je 0x404079
sub eax, 1
je 0x404079
sub eax, 1
je 0x404072
sub eax, 1
je 0x40406b
xor eax, eax
jmp 0x40496a
mov esi, str.shell_newcommand
jmp 0x40407e
mov esi, str.shellprintcommand
jmp 0x40407e
mov esi, 0x43c728
mov ecx, edx
call fcn.00405498
push 0x105
mov ecx, eax
mov dword [ebp - 0x964], eax
call fcn.00409ea0
test eax, eax
mov ecx, str.SOFTWAREMicrosoftSharedHTML
mov edx, str.SOFTWAREMicrosoftSharedMHTML
cmove edx, ecx
lea ecx, [ebp - 0x710]
call fcn.0040bc07
push 0x105
mov edx, 0x43c724
lea ecx, [ebp - 0x710]
call fcn.0040bc56
push 0x105
mov edx, ebx
lea ecx, [ebp - 0x710]
call fcn.0040bc56
xor eax, eax
inc eax
cmp word [ebx], 0x4f
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jne 0x4040f2
mov byte [ebp - 0x92d], al
jmp 0x404275
lea eax, [ebp - 0x92c]
push eax
push 0x20019
push ecx
lea edx, [ebp - 0x710]
mov ecx, reloc.AppVIsvSubsystems32.dll_Ordinal_1
call fcn.0040c1f1
test eax, eax
jne 0x404275
movzx eax, byte [ebp - 0x430]
xor ecx, ecx
cmp dword [ebp - 0x934], 1
mov dword [ebp - 0x95c], 0x20a
cmove eax, ecx
mov byte [ebp - 0x430], al
lea eax, [ebp - 0x95c]
push eax
lea eax, [ebp - 0x430]
push eax
lea eax, [ebp - 0x934]
push eax
push ecx
push 0x43c79c
push dword [ebp - 0x92c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40417a
cmp word [ebp - 0x430], di
je 0x40417a
inc eax
mov byte [ebp - 0x925], al
jmp 0x404339
xor eax, eax
mov byte [ebp - 0x935], al
jmp 0x404249
movzx eax, byte [ebp - 0x220]
xor ecx, ecx
cmp dword [ebp - 0x934], 1
cmove eax, ecx
mov byte [ebp - 0x220], al
lea eax, [ebp - 0x944]
push eax
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x934]
push eax
xor eax, eax
push eax
push eax
push dword [ebp - 0x924]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x404275
cmp word [ebp - 0x220], di
je 0x404275
xor ecx, ecx
inc ecx
cmp byte [ebp - 0x935], 0
mov al, cl
mov dword [ebp - 0x948], eax
jne 0x40444e
mov byte [ebp - 0x935], cl
lea edx, [ebp - 0x960]
lea ecx, [ebp - 0x220]
call fcn.00403f76
test eax, eax
jne 0x40444e
mov ecx, dword [ebp - 0x960]
test ecx, ecx
je 0x404224
cmp ecx, 4
jne 0x40444e
call fcn.004097bb
test eax, eax
je 0x40444e
cmp dword [ebp - 0x924], edi
je 0x404241
push dword [ebp - 0x924]
call ebx
xor eax, eax
mov dword [ebp - 0x924], eax
lea eax, [ebp - 0x924]
mov dword [ebp - 0x944], 0x20a
push eax
push 0x20019
push ecx
mov ecx, dword [ebp - 0x92c]
mov edx, esi
call fcn.0040c1f1
test eax, eax
je 0x404187
cmp dword [ebp - 0x92c], edi
je 0x404285
push dword [ebp - 0x92c]
call ebx
xor eax, eax
mov dword [ebp - 0x92c], eax
cmp dword [ebp - 0x924], eax
je 0x40429f
push dword [ebp - 0x924]
call ebx
xor eax, eax
mov dword [ebp - 0x924], eax
lea edx, [ebp - 0x710]
mov dword [ebp - 0x948], eax
lea eax, [ebp - 0x92c]
push eax
push 0x20019
push ecx
mov ecx, 0x80000002
call fcn.0040c1f1
test eax, eax
jne 0x40442e
movzx eax, byte [ebp - 0x430]
xor ecx, ecx
cmp dword [ebp - 0x934], 1
mov dword [ebp - 0x960], 0x20a
cmove eax, ecx
mov byte [ebp - 0x430], al
lea eax, [ebp - 0x960]
push eax
lea eax, [ebp - 0x430]
push eax
lea eax, [ebp - 0x934]
push eax
xor eax, eax
push eax
push 0x43c79c
push dword [ebp - 0x92c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40439d
cmp word [ebp - 0x430], di
je 0x40439d
inc eax
cmp byte [ebp - 0x92d], 0
mov byte [ebp - 0x925], al
jne 0x404350
push 0x105
lea edx, [ebp - 0x430]
mov ecx, 0x46b068
call fcn.0040bc07
jmp 0x404368
lea edx, [ebp - 0x430]
mov ecx, 0x46b068
call fcn.0040baaf
test eax, eax
jne 0x404926
xor edx, edx
lea ecx, [ebp - 0x430]
call fcn.0040b7bc
xor edx, edx
mov dword [ebp - 0x950], eax
lea ecx, [ebp - 0x430]
call fcn.0040bc95
mov edi, eax
xor eax, eax
mov dword [ebp - 0x94c], edi
mov dword [ebp - 0x948], eax
jmp 0x404606
xor eax, eax
mov dword [ebp - 0x95c], 0x20a
mov dword [ebp - 0x948], eax
mov edx, esi
lea eax, [ebp - 0x924]
push eax
push 0x20019
push ecx
mov ecx, dword [ebp - 0x92c]
call fcn.0040c1f1
test eax, eax
jne 0x40442e
movzx eax, byte [ebp - 0x220]
xor ecx, ecx
xor esi, esi
inc esi
cmp dword [ebp - 0x934], esi
cmove eax, ecx
mov byte [ebp - 0x220], al
mov al, cl
mov dword [ebp - 0x948], eax
lea eax, [ebp - 0x95c]
push eax
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x934]
push eax
push ecx
push ecx
push dword [ebp - 0x924]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40442e
cmp word [ebp - 0x220], di
mov ecx, edi
movzx eax, al
cmovne eax, esi
mov dword [ebp - 0x948], eax
jmp 0x40443a
mov ecx, dword [ebp - 0x93c]
mov eax, dword [ebp - 0x948]
test ecx, ecx
jne 0x40471a
test al, al
je 0x4044b0
cmp byte [ebp - 0x92d], cl
jne 0x404465
push 0x105
lea edx, [ebp - 0x220]
mov ecx, 0x46b278
call fcn.0040bc07
jmp 0x40447d
lea edx, [ebp - 0x220]
mov ecx, 0x46b278
call fcn.0040baaf
test eax, eax
jne 0x40491a
lea edx, [ebp - 0x94c]
lea ecx, [ebp - 0x220]
call fcn.0040b931
mov ecx, dword [ebp - 0x92c]
mov esi, eax
mov edi, dword [ebp - 0x94c]
mov dword [ebp - 0x950], esi
mov dword [ebp - 0x93c], ecx
test ecx, ecx
jne 0x404720
cmp byte [ebp - 0x925], 0
jne 0x404713
cmp byte [ebp - 0x926], 3
jne 0x404713
mov eax, dword [ebp - 0x92c]
test eax, eax
je 0x4044d7
push eax
call ebx
xor eax, eax
mov dword [ebp - 0x92c], eax
cmp dword [ebp - 0x924], eax
je 0x4044f1
push dword [ebp - 0x924]
call ebx
xor eax, eax
mov dword [ebp - 0x924], eax
lea edx, [ebp - 0x710]
lea eax, [ebp - 0x92c]
mov esi, 0x20019
push eax
push esi
push ecx
mov ecx, reloc.AppVIsvSubsystems32.dll_Ordinal_1
call fcn.0040c1f1
test eax, eax
je 0x40453a
lea eax, [ebp - 0x92c]
push eax
push esi
push ecx
lea edx, [ebp - 0x710]
mov ecx, 0x80000002
call fcn.0040c1f1
test eax, eax
jne 0x404713
lea eax, [ebp - 0x924]
mov dword [ebp - 0x960], 0x20a
push eax
push esi
push ecx
mov ecx, dword [ebp - 0x92c]
mov edx, 0x43c728
call fcn.0040c1f1
test eax, eax
jne 0x404713
movzx eax, byte [ebp - 0x220]
xor edx, edx
xor ecx, ecx
inc edx
cmp dword [ebp - 0x934], edx
cmove eax, ecx
mov byte [ebp - 0x220], al
lea eax, [ebp - 0x960]
push eax
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x934]
push eax
xor eax, eax
push eax
push eax
push dword [ebp - 0x924]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x404713
cmp word [ebp - 0x220], ax
je 0x404713
lea edx, [ebp - 0x94c]
lea ecx, [ebp - 0x220]
call fcn.0040b931
mov edi, dword [ebp - 0x94c]
mov esi, eax
mov dword [ebp - 0x950], esi
cmp esi, 9
je 0x404713
push 0x105
mov edx, edi
lea ecx, [ebp - 0x430]
call fcn.0040bc07
xor eax, eax
inc eax
mov byte [ebp - 0x925], al
xor eax, eax
mov word [ebp - 0x220], ax
lea eax, [ebp - 0x940]
mov esi, 0x20019
push eax
push esi
push ecx
lea edx, [ebp - 0x430]
mov ecx, Ordinal_1
call fcn.0040c1f1
test eax, eax
jne 0x40442e
mov dword [ebp - 0x944], eax
mov edx, str.CurVer
lea eax, [ebp - 0x944]
mov dword [ebp - 0x95c], 0xca
push eax
push esi
push ecx
mov ecx, dword [ebp - 0x940]
call fcn.0040c1f1
test eax, eax
jne 0x4046e3
movzx eax, byte [ebp - 0x500]
xor edx, edx
xor ecx, ecx
inc edx
cmp dword [ebp - 0x934], edx
cmove eax, ecx
mov byte [ebp - 0x500], al
lea eax, [ebp - 0x95c]
push eax
lea eax, [ebp - 0x500]
push eax
lea eax, [ebp - 0x934]
push eax
xor eax, eax
push eax
push eax
push dword [ebp - 0x944]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4046e3
cmp word [ebp - 0x500], ax
je 0x4046e3
lea eax, [ebp - 0x968]
push eax
push esi
push ecx
lea edx, [ebp - 0x500]
mov ecx, Ordinal_1
call fcn.0040c1f1
test eax, eax
jne 0x4046e3
cmp dword [ebp - 0x940], eax
je 0x4046d7
push dword [ebp - 0x940]
call ebx
mov eax, dword [ebp - 0x968]
mov dword [ebp - 0x940], eax
cmp dword [ebp - 0x944], 0
mov ecx, dword [ebp - 0x940]
mov dword [ebp - 0x93c], ecx
je 0x404706
push dword [ebp - 0x944]
call ebx
mov ecx, dword [ebp - 0x93c]
xor eax, eax
mov dword [ebp - 0x944], eax
jmp 0x404434
xor eax, eax
jmp 0x404914
mov esi, dword [ebp - 0x950]
test edi, edi
je 0x404754
mov eax, dword [ebp - 0x958]
cmp dword [eax + 0xc], 0
je 0x404740
push dword [eax + 0xc]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, dword [ebp - 0x958]
pop ecx
xor ecx, ecx
mov dword [eax + 0xc], edi
mov edi, ecx
mov ecx, eax
call fcn.00405498
mov dword [ebp - 0x964], eax
cmp esi, 9
je 0x4047d8
mov al, byte [ebp - 0x926]
cmp al, 2
je 0x4047d8
xor ecx, ecx
inc ecx
cmp al, cl
jne 0x404772
mov esi, dword [0x43cda0]
jmp 0x40477f
mov edx, dword [ebp - 0x96c]
mov esi, dword [edx*4 + 0x43cda0]
mov ecx, dword [ebp - 0x93c]
xor eax, eax
push eax
push dword [ebp - 0x958]
mov edx, esi
push dword [ebp - 0x950]
call fcn.00402bc8
mov dword [ebp - 0x954], eax
test eax, eax
jne 0x40491a
cmp esi, dword [0x43cda0]
jne 0x40491a
mov edx, dword [0x43cda4]
mov ecx, dword [ebp - 0x93c]
push eax
push dword [ebp - 0x958]
push dword [ebp - 0x950]
call fcn.00402bc8
jmp 0x404914
push 0x104
lea eax, [ebp - 0x920]
push eax
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
dec eax
cmp eax, 0x103
ja 0x4048d9
cmp byte [ebp - 0x926], 3
jne 0x4048ad
cmp word [ebp - 0x920], 0
jne 0x4048ad
cmp dword [ebp - 0x924], 0
je 0x404829
push dword [ebp - 0x924]
call ebx
xor eax, eax
mov dword [ebp - 0x968], 0x20a
mov dword [ebp - 0x924], eax
mov edx, str.shell_newcommand
lea eax, [ebp - 0x924]
push eax
push 0x20019
push ecx
mov ecx, dword [ebp - 0x93c]
call fcn.0040c1f1
test eax, eax
jne 0x40491a
movzx eax, byte [ebp - 0x920]
xor edx, edx
xor ecx, ecx
inc edx
cmp dword [ebp - 0x934], edx
cmove eax, ecx
mov byte [ebp - 0x920], al
lea eax, [ebp - 0x968]
push eax
lea eax, [ebp - 0x920]
push eax
lea eax, [ebp - 0x934]
push eax
xor eax, eax
push eax
push eax
push dword [ebp - 0x924]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40491a
cmp word [ebp - 0x920], ax
je 0x40491a
mov ecx, dword [ebp - 0x964]
call fcn.0040b9b7
mov edx, dword [ebp - 0x964]
push ecx
mov ecx, dword [ebp - 0x958]
push dword [ecx + 0x14]
push dword [ecx + 0x10]
lea ecx, [ebp - 0x920]
push eax
call fcn.004039fd
jmp 0x404914
mov cl, byte [ebp - 0x926]
test cl, cl
jne 0x4048eb
mov edx, dword [0x43cda4]
jmp 0x4048f8
mov edx, dword [ebp - 0x96c]
mov edx, dword [edx*4 + 0x43cda0]
mov esi, dword [ebp - 0x964]
xor eax, eax
cmp cl, 2
push ecx
mov ecx, dword [ebp - 0x93c]
sete al
push eax
push esi
call fcn.0040395e
mov dword [ebp - 0x954], eax
test edi, edi
je 0x404926
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
pop ecx
cmp dword [ebp - 0x924], 0
je 0x404937
push dword [ebp - 0x924]
call ebx
xor eax, eax
mov dword [ebp - 0x924], eax
cmp dword [ebp - 0x940], eax
je 0x404951
push dword [ebp - 0x940]
call ebx
xor eax, eax
mov dword [ebp - 0x940], eax
mov eax, dword [ebp - 0x92c]
test eax, eax
je 0x404964
push eax
call ebx
mov eax, dword [ebp - 0x954]
call fcn.00438650
ret 0x10