Function at 0x40a800
Capabilities:
Set environment variable

Disassembly:
push 0xffffffffffffffff
push 0x52c7cb
mov eax, dword fs:[0]
push eax
sub esp, 0x100
mov eax, dword [0x56fcac]
xor eax, esp
mov dword [esp + 0xf8], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x56fcac]
xor eax, esp
push eax
lea eax, [esp + 0x114]
mov dword fs:[0], eax
xor ebx, ebx
mov dword [esp + 0x11c], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x40], esp
mov byte [esp + 0x138], 1
push ebx
mov edi, 7
mov dword [ecx + 0x18], edi
mov dword [ecx + 0x14], ebx
push 0x547f9c
mov word [ecx + 4], bx
call fcn.00402af0
push 1
lea esi, [esp + 0xbc]
call fcn.0043bd10
mov byte [esp + 0x11c], 2
push 0x3c
push str.SYSTEMCurrentControlSetControlSession_ManagerEnvironment
lea ecx, [esp + 0x50]
mov dword [esp + 0x68], edi
mov dword [esp + 0x64], ebx
mov word [esp + 0x54], bx
call fcn.00402af0
mov byte [esp + 0x11c], 3
cmp dword [esp + 0x60], 8
mov esi, dword [esp + 0x4c]
jae 0x40a8c1
lea esi, [esp + 0x4c]
mov eax, dword [esp + 0x18]
cmp eax, ebx
mov ebp, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
je 0x40a8d6
push eax
call ebp
mov dword [esp + 0x18], ebx
lea eax, [esp + 0x18]
push eax
push 0x20019
push ebx
push esi
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, ebx
je 0x40a956
cmp dword [esp + 0x60], 8
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], ebx
jb 0x40a90d
mov ecx, dword [esp + 0x4c]
push ecx
call fcn.004aaa59
add esp, 4
lea esi, [esp + 0x9c]
mov dword [esp + 0x60], edi
mov dword [esp + 0x5c], ebx
mov word [esp + 0x4c], bx
call fcn.0043bdc0
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x40a935
push eax
call ebp
mov dword [esp + 0x18], ebx
cmp dword [esp + 0x13c], 8
jb 0x40a94f
mov edx, dword [esp + 0x128]
push edx
call fcn.004aaa59
add esp, 4
xor al, al
jmp 0x40aeda
cmp dword [esp + 0x138], ebx
je 0x40ac3d
mov dword [esp + 0x98], edi
mov dword [esp + 0x94], ebx
mov word [esp + 0x84], bx
mov byte [esp + 0x11c], 4
mov eax, dword [esp + 0x128]
mov esi, 8
cmp dword [esp + 0x13c], esi
jae 0x40a99d
lea eax, [esp + 0x128]
lea ecx, [esp + 0x9c]
push ecx
push eax
lea ebx, [esp + 0x20]
call fcn.004017d0
test al, al
jne 0x40aa51
cmp dword [esp + 0x98], esi
jb 0x40a9d0
mov edx, dword [esp + 0x84]
push edx
call fcn.004aaa59
add esp, 4
xor edi, edi
mov ebx, 8
cmp dword [esp + 0x60], ebx
mov esi, 7
mov dword [esp + 0x98], esi
mov dword [esp + 0x94], edi
mov word [esp + 0x84], di
jb 0x40aa05
mov eax, dword [esp + 0x4c]
push eax
call fcn.004aaa59
add esp, 4
mov dword [esp + 0x60], esi
lea esi, [esp + 0x9c]
mov dword [esp + 0x5c], edi
mov word [esp + 0x4c], di
call fcn.0043bdc0
mov eax, dword [esp + 0x18]
cmp eax, edi
je 0x40aa2d
push eax
call ebp
mov dword [esp + 0x18], edi
cmp dword [esp + 0x13c], ebx
jb 0x40a94f
mov ecx, dword [esp + 0x128]
push ecx
call fcn.004aaa59
add esp, 4
xor al, al
jmp 0x40aeda
xor edi, edi
mov ebp, 7
mov dword [esp + 0x7c], ebp
mov dword [esp + 0x78], edi
mov word [esp + 0x68], di
mov bl, 5
mov byte [esp + 0x11c], bl
mov eax, dword [esp + 0x9c]
cmp eax, 1
jne 0x40aa9e
lea edx, [esp + 0x9c]
push edx
lea esi, [esp + 0x30]
call fcn.0043d3b0
lea ecx, [esp + 0x64]
mov byte [esp + 0x11c], 6
call fcn.00408770
jmp 0x40aacd
cmp eax, 2
jne 0x40abf7
lea eax, [esp + 0x9c]
push eax
lea esi, [esp + 0x30]
call fcn.0043d3e0
push 0xffffffffffffffff
push edi
push eax
lea ecx, [esp + 0x70]
mov byte [esp + 0x128], 7
call fcn.00403310
lea ecx, [esp + 0x2c]
mov byte [esp + 0x11c], bl
call fcn.00401e70
lea ecx, [esp + 0x9c]
push ecx
lea esi, [esp + 0x30]
call fcn.0043d3e0
mov ebx, 8
cmp dword [eax + 0x18], ebx
jb 0x40aafd
mov eax, dword [eax + 4]
jmp 0x40ab00
add eax, 4
cmp dword [esp + 0x13c], ebx
mov ecx, dword [esp + 0x128]
jae 0x40ab17
lea ecx, [esp + 0x128]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
cmp eax, 1
sete byte [esp + 0x23]
cmp dword [esp + 0x44], ebx
jb 0x40ab3a
mov edx, dword [esp + 0x30]
push edx
call fcn.004aaa59
add esp, 4
cmp dword [esp + 0x7c], ebx
mov dword [esp + 0x44], ebp
mov dword [esp + 0x40], edi
mov word [esp + 0x30], di
jb 0x40ab5a
mov eax, dword [esp + 0x68]
push eax
call fcn.004aaa59
add esp, 4
cmp dword [esp + 0x98], ebx
mov dword [esp + 0x7c], ebp
mov dword [esp + 0x78], edi
mov word [esp + 0x68], di
jb 0x40ab80
mov ecx, dword [esp + 0x84]
push ecx
call fcn.004aaa59
add esp, 4
cmp dword [esp + 0x60], ebx
mov dword [esp + 0x98], ebp
mov dword [esp + 0x94], edi
mov word [esp + 0x84], di
jb 0x40aba9
mov edx, dword [esp + 0x4c]
push edx
call fcn.004aaa59
add esp, 4
lea esi, [esp + 0x9c]
mov dword [esp + 0x60], ebp
mov dword [esp + 0x5c], edi
mov word [esp + 0x4c], di
call fcn.0043bdc0
mov eax, dword [esp + 0x18]
cmp eax, edi
je 0x40abd5
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0x18], edi
cmp dword [esp + 0x13c], ebx
jb 0x40abee
mov eax, dword [esp + 0x128]
push eax
call fcn.004aaa59
add esp, 4
mov al, byte [esp + 0x23]
jmp 0x40aeda
lea ecx, [esp + 0x64]
call fcn.00401e70
lea ecx, [esp + 0x80]
call fcn.00401e70
lea ecx, [esp + 0x48]
call fcn.00401e70
lea esi, [esp + 0x9c]
call fcn.0043bdc0
lea ecx, [esp + 0x18]
call fcn.00401450
lea ecx, [esp + 0x124]
call fcn.00401e70
xor al, al
jmp 0x40aeda
mov dword [esp + 0x84], ebx
mov dword [esp + 0x88], ebx
mov dword [esp + 0x8c], ebx
mov dword [esp + 0x68], ebx
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x70], ebx
lea ecx, [esp + 0x80]
push ecx
lea ecx, [esp + 0x68]
lea edx, [esp + 0x1c]
mov byte [esp + 0x120], 9
call fcn.00401970
test al, al
jne 0x40acf5
lea esi, [esp + 0x64]
call fcn.004098f0
lea esi, [esp + 0x80]
call fcn.004098f0
cmp dword [esp + 0x60], 8
jb 0x40aca8
mov edx, dword [esp + 0x4c]
push edx
call fcn.004aaa59
add esp, 4
lea esi, [esp + 0x9c]
mov dword [esp + 0x60], edi
mov dword [esp + 0x5c], ebx
mov word [esp + 0x4c], bx
call fcn.0043bdc0
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x40acd0
push eax
call ebp
mov dword [esp + 0x18], ebx
cmp dword [esp + 0x13c], 8
jb 0x40a94f
mov eax, dword [esp + 0x128]
push eax
call fcn.004aaa59
add esp, 4
xor al, al
jmp 0x40aeda
mov edi, dword [esp + 0x6c]
mov esi, dword [esp + 0x68]
xor ebp, ebp
mov dword [esp + 0x24], ebx
cmp esi, ebx
je 0x40ae27
mov ecx, edi
sub ecx, esi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ebp, eax
jae 0x40ae07
mov ecx, dword [esp + 0x24]
cmp dword [esi + ecx + 0x14], ebx
je 0x40ad95
cmp esi, ebx
je 0x40ad51
sub edi, esi
mov eax, 0x92492493
imul edi
add edx, edi
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ebp, eax
jb 0x40ad5a
call fcn.004ec14b
mov esi, dword [esp + 0x68]
mov edx, dword [esp + 0x24]
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x44], esp
push 0xffffffffffffffff
add esi, edx
push ebx
mov edi, 7
mov dword [ecx + 0x18], edi
mov dword [ecx + 0x14], ebx
push esi
mov word [ecx + 4], bx
call fcn.00403310
call fcn.0040a800
add esp, 0x1c
cmp al, bl
je 0x40ada2
mov edi, dword [esp + 0x6c]
mov esi, dword [esp + 0x68]
add ebp, 1
add dword [esp + 0x24], 0x1c
jmp 0x40ad03
lea esi, [esp + 0x64]
call fcn.004098f0
lea esi, [esp + 0x80]
call fcn.004098f0
mov ebp, 8
cmp dword [esp + 0x60], ebp
jb 0x40adcf
mov eax, dword [esp + 0x4c]
push eax
call fcn.004aaa59
add esp, 4
lea esi, [esp + 0x9c]
mov dword [esp + 0x60], edi
mov dword [esp + 0x5c], ebx
mov word [esp + 0x4c], bx
call fcn.0043bdc0
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x40adfb
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0x18], ebx
cmp dword [esp + 0x13c], ebp
jmp 0x40aa34
cmp esi, ebx
je 0x40ae27
mov edx, dword [esp + 0x28]
push edx
mov eax, esi
call fcn.00403ea0
mov eax, dword [esp + 0x6c]
add esp, 4
push eax
call fcn.004aaa59
add esp, 4
mov eax, dword [esp + 0x84]
cmp eax, ebx
mov dword [esp + 0x68], ebx
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x70], ebx
je 0x40ae62
mov ecx, dword [esp + 0x28]
mov edi, dword [esp + 0x88]
push ecx
call fcn.00403ea0
mov edx, dword [esp + 0x88]
add esp, 4
push edx
call fcn.004aaa59
add esp, 4
mov edi, 8
cmp dword [esp + 0x60], edi
mov dword [esp + 0x84], ebx
mov dword [esp + 0x88], ebx
mov dword [esp + 0x8c], ebx
jb 0x40ae8f
mov eax, dword [esp + 0x4c]
push eax
call fcn.004aaa59
add esp, 4
lea esi, [esp + 0x9c]
mov dword [esp + 0x60], 7
mov dword [esp + 0x5c], ebx
mov word [esp + 0x4c], bx
call fcn.0043bdc0
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x40aebf
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0x18], ebx
cmp dword [esp + 0x13c], edi
jb 0x40aed8
mov ecx, dword [esp + 0x128]
push ecx
call fcn.004aaa59
add esp, 4
mov al, 1
mov ecx, dword [esp + 0x114]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xf8]
xor ecx, esp
call fcn.004ead41
add esp, 0x10c
ret