Function at 0x49654d
Capabilities:
Set environment variable

Disassembly:
push 0x24
mov eax, 0x6c26c4
call fcn.00401167
mov edi, edx
xor ebx, ebx
mov dword [ebp - 0x14], ecx
mov esi, dword [ebp - 0x14]
test esi, esi
je 0x496ac7
movzx eax, word [esi]
cmp eax, 0x2f
je 0x49657c
cmp eax, 0x2d
jne 0x4966ec
mov esi, dword [ebp - 0x14]
lea eax, [edi + 4]
add esi, 2
cmp dword [eax], 0
mov dword [ebp - 0x14], esi
jne 0x4965a2
lea ecx, [ebp - 0x14]
mov edx, 0x47e070
push ecx
push eax
mov ecx, esi
call fcn.00435b0b
test al, al
jne 0x496560
lea eax, [edi + 8]
cmp dword [eax], 0
jne 0x4965c0
lea ecx, [ebp - 0x14]
mov edx, 0x496bd4
push ecx
mov ecx, dword [ebp - 0x14]
push eax
call fcn.00435b0b
test al, al
jne 0x496560
cmp dword [edi + 0x28], 0
jne 0x496668
and dword [ebp - 0x24], 0
and dword [ebp - 4], 0
lea eax, [ebp - 0x14]
mov ecx, dword [ebp - 0x14]
mov edx, 0x496be8
push eax
lea eax, [ebp - 0x24]
push eax
call fcn.00435b0b
test al, al
je 0x496657
mov esi, dword [ebp - 0x24]
push esi
push 0
push 2
call dword [sym.imp.KERNEL32.dll_OpenEventW]
mov dword [ebp - 0x28], eax
test eax, eax
jne 0x496644
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00435aec
and dword [ebp - 0x20], 0
mov ebx, eax
mov byte [ebp - 4], 1
lea eax, [ebp - 0x20]
push eax
push 0x243
mov ecx, 0x6fe668
call fcn.0060f80b
test eax, eax
je 0x496a3d
push 6
pop ebx
mov byte [ebp - 4], 0
push dword [ebp - 0x20]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [ebp - 0x28]
mov dword [edi + 0x28], eax
or dword [ebp - 4], 0xffffffff
push esi
mov esi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
jmp 0x49696a
or dword [ebp - 4], 0xffffffff
push dword [ebp - 0x24]
mov esi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
call esi
jmp 0x49666e
mov esi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x14]
push eax
lea eax, [edi + 0x14]
mov edx, 0x496c18
push eax
call fcn.00433e60
test al, al
je 0x4966f4
mov esi, dword [ebp - 0x14]
test esi, esi
je 0x496560
push 2
push 0x47e07c
push esi
call fcn.00433f17
test eax, eax
jne 0x496560
cmp dword [edi + 0x28], eax
jne 0x496560
lea eax, [ebp - 0x14]
mov ecx, esi
push eax
lea edx, [ebp - 0x2c]
call fcn.00434256
test al, al
je 0x4966ec
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x14]
push eax
lea edx, [edi + 0x2c]
call fcn.00437e01
test al, al
je 0x4966ec
mov edx, dword [ebp - 0x2c]
lea eax, [edi + 0x28]
mov ecx, dword [edi + 0x2c]
push eax
call fcn.0049703a
test al, al
jne 0x496560
push 6
pop ebx
jmp 0x496afb
cmp dword [edi], 0
jne 0x49672d
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x14]
push eax
push edi
mov edx, 0x496c38
call fcn.00435b0b
test al, al
jne 0x496560
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x14]
push eax
push edi
mov edx, 0x496c3c
call fcn.00435b0b
test al, al
jne 0x496560
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x14]
push eax
lea eax, [edi + 0xc]
mov edx, 0x496c48
push eax
call fcn.00433e60
test al, al
jne 0x496560
lea ecx, [ebp - 0x14]
mov edx, 0x496c58
push ecx
mov ecx, dword [ebp - 0x14]
lea eax, [edi + 0x10]
push eax
call fcn.004970c6
test al, al
je 0x49676e
cmp dword [edi + 0x10], 0
jle 0x4966ec
jmp 0x496560
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x14]
push eax
lea eax, [edi + 0x1d]
mov edx, 0x496c7c
push eax
push 0x496c68
call fcn.0049700a
test al, al
jne 0x496560
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x14]
push eax
lea eax, [edi + 0x1e]
mov edx, 0x496ca4
push eax
push 0x496c90
call fcn.0049700a
test al, al
jne 0x496560
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x14]
push eax
lea eax, [edi + 0x1f]
mov edx, 0x496cd8
push eax
push 0x496cb8
call fcn.0049700a
test al, al
jne 0x496560
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x14]
push eax
lea eax, [edi + 0x20]
mov edx, 0x496d18
push eax
push 0x496cf8
call fcn.0049700a
test al, al
jne 0x496560
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x14]
push eax
lea eax, [edi + 0x22]
mov edx, 0x496d38
push eax
call fcn.00433e60
test al, al
jne 0x496560
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x14]
push eax
lea eax, [edi + 0x30]
mov edx, 0x496d4c
push eax
call fcn.00433e60
test al, al
jne 0x496560
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x14]
push eax
lea eax, [edi + 0x21]
mov edx, 0x496d64
push eax
call fcn.00433e60
test al, al
jne 0x496560
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x14]
push eax
lea eax, [edi + 0x23]
mov edx, 0x496d84
push eax
call fcn.00433e60
test al, al
jne 0x496560
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x14]
push eax
lea eax, [edi + 0x25]
mov edx, 0x496da4
push eax
call fcn.00433e60
test al, al
jne 0x496560
cmp dword [edi + 0x18], 2
je 0x4968aa
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0xd]
mov edx, 0x496dc4
push eax
call fcn.00433e60
test al, al
jne 0x496a31
cmp dword [edi + 0x18], 3
je 0x4968df
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0xd]
mov edx, 0x496dd4
push eax
call fcn.00433e60
test al, al
je 0x4968df
mov dword [edi + 0x18], 2
mov dword [0x721ab0], 2
jmp 0x496560
and dword [ebp - 0x18], 0
mov dword [ebp - 4], 7
lea eax, [ebp - 0x14]
mov ecx, dword [ebp - 0x14]
mov edx, 0x496de0
push eax
lea eax, [ebp - 0x18]
push eax
call fcn.00435b0b
test al, al
je 0x496921
push dword [ebp - 0x18]
push 0x496b38
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
test eax, eax
jne 0x496918
push 6
pop ebx
or dword [ebp - 4], 0xffffffff
push dword [ebp - 0x18]
jmp 0x49696a
or dword [ebp - 4], 0xffffffff
push dword [ebp - 0x18]
call esi
and dword [ebp - 0x1c], 0
mov dword [ebp - 4], 8
lea eax, [ebp - 0x14]
mov ecx, dword [ebp - 0x14]
mov edx, 0x496e10
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.00435b0b
test al, al
je 0x496979
push dword [ebp - 0x1c]
push 0x496b80
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
test eax, eax
jne 0x496963
push 6
pop ebx
or dword [ebp - 4], 0xffffffff
push dword [ebp - 0x1c]
call esi
test ebx, ebx
jne 0x496afb
jmp 0x496560
or dword [ebp - 4], 0xffffffff
push dword [ebp - 0x1c]
call esi
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x14]
push eax
lea eax, [edi + 0x1c]
mov edx, 0x496e48
push eax
call fcn.00433e60
test al, al
jne 0x496560
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x14]
push eax
lea eax, [edi + 0x31]
mov edx, 0x496e58
push eax
call fcn.00433e60
test al, al
jne 0x496560
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x30]
mov edx, 0x496e6c
push eax
call fcn.004970c6
test al, al
je 0x4969ef
mov ecx, dword [ebp - 0x30]
lea eax, [ecx - 1]
cmp eax, 0xfffd
ja 0x4966ec
mov word [edi + 0x26], cx
jmp 0x496560
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0xd]
mov edx, 0x496e78
push eax
call fcn.00433e60
test al, al
je 0x496a14
mov byte [0x6fe824], 1
jmp 0x496560
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x14]
push eax
lea eax, [edi + 0x24]
mov edx, 0x496eb4
push eax
call fcn.00433e60
test al, al
je 0x4966ec
mov dword [edi + 0x18], 3
jmp 0x496560
lea ecx, [ebp - 0x14]
call fcn.004366f5
mov byte [ebp - 4], 2
lea eax, [ebp - 0x14]
push esi
push dword [ebp - 0x20]
push eax
call fcn.0048c9cb
add esp, 0xc
lea ecx, [ebp - 0x14]
push 0x20
call fcn.00497099
mov edx, ebx
lea ecx, [ebp - 0x30]
call fcn.0049c24e
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x14]
mov eax, dword [eax]
push dword [eax - 0xc]
push eax
call fcn.00439535
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x30]
lea ecx, [ecx - 0x10]
call fcn.0040119b
push dword [ebp - 0x14]
xor edx, edx
xor ecx, ecx
inc edx
call fcn.0049c158
push 7
pop ebx
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x14]
lea ecx, [ecx - 0x10]
call fcn.0040119b
mov byte [ebp - 4], 0
push dword [ebp - 0x20]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
or dword [ebp - 4], 0xffffffff
push esi
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
jmp 0x496afb
cmp dword [edi + 0x18], 3
je 0x496ad3
cmp byte [edi + 0x1c], 0
jmp 0x496adc
cmp dword [edi], 0
jne 0x496ade
cmp dword [edi + 4], 0
je 0x496ae1
push 6
pop ebx
cmp byte [edi + 0x23], 0
jne 0x496aed
cmp byte [edi + 0x25], 0
je 0x496af7
cmp byte [edi + 0x14], 0
je 0x4966ec
test ebx, ebx
je 0x496b2b
push dword [edi]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
push dword [edi + 4]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
push dword [edi + 8]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
push dword [edi + 0x28]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x34
push 0
push edi
call fcn.00436326
add esp, 0xc
mov eax, ebx
call fcn.004026a3
ret