Function at 0x10005b20
Capabilities:
Set environment variable

Disassembly:
push 0xffffffffffffffff
push 0x1006d964
mov eax, dword fs:[0]
push eax
sub esp, 0x16c
mov eax, dword [0x1007d1f8]
xor eax, esp
mov dword [esp + 0x168], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x1007d1f8]
xor eax, esp
push eax
lea eax, [esp + 0x180]
mov dword fs:[0], eax
xor ebx, ebx
mov dword [esp + 0x188], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x3c], esp
mov byte [esp + 0x1a4], 1
push ebx
mov edi, 0xf
mov dword [ecx + 0x18], edi
mov dword [ecx + 0x14], ebx
push 0x100735cc
mov byte [ecx + 4], bl
call fcn.10003ca0
lea esi, [esp + 0xb8]
call fcn.10027a80
mov byte [esp + 0x188], 2
push 0x3c
push str.SYSTEMCurrentControlSetControlSession_ManagerEnvironment
lea ecx, [esp + 0x50]
mov dword [esp + 0x68], edi
mov dword [esp + 0x64], ebx
mov byte [esp + 0x54], bl
call fcn.10003ca0
mov byte [esp + 0x188], 3
cmp dword [esp + 0x60], 0x10
mov esi, dword [esp + 0x4c]
jae 0x10005bdd
lea esi, [esp + 0x4c]
mov eax, dword [esp + 0x18]
cmp eax, ebx
mov ebp, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
je 0x10005bf2
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_RegOpenKeyExA]
cmp eax, ebx
je 0x10005c71
cmp dword [esp + 0x60], 0x10
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], ebx
jb 0x10005c29
mov ecx, dword [esp + 0x4c]
push ecx
call fcn.10040f62
add esp, 4
lea esi, [esp + 0x9c]
mov dword [esp + 0x60], edi
mov dword [esp + 0x5c], ebx
mov byte [esp + 0x4c], bl
call fcn.10027b20
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x10005c50
push eax
call ebp
mov dword [esp + 0x18], ebx
cmp dword [esp + 0x1a8], 0x10
jb 0x10005c6a
mov edx, dword [esp + 0x194]
push edx
call fcn.10040f62
add esp, 4
xor al, al
jmp 0x100062bd
cmp dword [esp + 0x1a4], ebx
je 0x10006045
mov eax, dword [esp + 0x194]
mov esi, 0x10
cmp dword [esp + 0x1a8], esi
jae 0x10005c9a
lea eax, [esp + 0x194]
lea ecx, [esp + 0x9c]
push ecx
push eax
lea ebx, [esp + 0x20]
call fcn.1002a170
test al, al
jne 0x10005d11
cmp dword [esp + 0x60], esi
jb 0x10005cc3
mov edx, dword [esp + 0x4c]
push edx
call fcn.10040f62
add esp, 4
xor ebx, ebx
lea esi, [esp + 0x9c]
mov dword [esp + 0x60], edi
mov dword [esp + 0x5c], ebx
mov byte [esp + 0x4c], bl
call fcn.10027b20
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x10005cec
push eax
call ebp
mov dword [esp + 0x18], ebx
cmp dword [esp + 0x1a8], 0x10
jb 0x10005c6a
mov eax, dword [esp + 0x194]
push eax
call fcn.10040f62
add esp, 4
xor al, al
jmp 0x100062bd
xor ebx, ebx
mov dword [esp + 0x98], edi
mov dword [esp + 0x94], ebx
mov byte [esp + 0x84], bl
mov byte [esp + 0x188], 4
mov eax, dword [esp + 0x9c]
cmp eax, 1
jne 0x10005d56
lea esi, [esp + 0x64]
lea eax, [esp + 0x9c]
call fcn.100290c0
mov byte [esp + 0x188], 5
jmp 0x10005d77
cmp eax, 2
jne 0x10006002
lea esi, [esp + 0x64]
lea eax, [esp + 0x9c]
call fcn.100290f0
mov byte [esp + 0x188], 6
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [esp + 0x8c]
call fcn.10003960
lea ecx, [esp + 0x64]
mov byte [esp + 0x188], 4
call fcn.100037f0
push str.Path
lea ecx, [esp + 0x68]
call fcn.10003780
lea ecx, [esp + 0x190]
push ecx
lea edx, [esp + 0x68]
push edx
call fcn.1000a4a0
add esp, 8
test eax, eax
sete byte [esp + 0x17]
cmp dword [esp + 0x7c], 0x10
jb 0x10005dd6
mov eax, dword [esp + 0x68]
push eax
call fcn.10040f62
add esp, 4
cmp byte [esp + 0x17], bl
je 0x10005f34
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
push 0x20019
push str.Environment
push SysReAllocString
lea esi, [esp + 0x30]
mov byte [esp + 0x194], 7
call fcn.10029c40
test al, al
je 0x10005f29
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x3c], esp
push 0x100735cc
call fcn.10003780
lea esi, [esp + 0x128]
call fcn.10027a80
mov dword [esp + 0x7c], edi
mov dword [esp + 0x78], ebx
mov byte [esp + 0x68], bl
mov byte [esp + 0x188], 9
cmp dword [esp + 0x1a8], 0x10
mov eax, dword [esp + 0x194]
jae 0x10005e5b
lea eax, [esp + 0x194]
lea ecx, [esp + 0x10c]
push ecx
push eax
lea ebx, [esp + 0x2c]
call fcn.1002a170
test al, al
je 0x10005ed3
mov eax, dword [esp + 0x10c]
cmp eax, 1
jne 0x10005e97
lea esi, [esp + 0x2c]
lea eax, [esp + 0x10c]
call fcn.100290c0
mov byte [esp + 0x188], 0xa
jmp 0x10005eb4
cmp eax, 2
jne 0x10005ed3
lea esi, [esp + 0x2c]
lea eax, [esp + 0x10c]
call fcn.100290f0
mov byte [esp + 0x188], 0xb
push 0xffffffffffffffff
push 0
push eax
lea ecx, [esp + 0x70]
call fcn.10003960
lea ecx, [esp + 0x2c]
mov byte [esp + 0x188], 9
call fcn.100037f0
cmp dword [esp + 0x78], 0
je 0x10005f12
push 0x100736b4
lea ecx, [esp + 0x68]
call fcn.10006bd0
push 0xffffffffffffffff
push 0
lea edx, [esp + 0x88]
push edx
lea ecx, [esp + 0x70]
call fcn.10006df0
push 0xffffffffffffffff
push 0
lea eax, [esp + 0x6c]
push eax
lea ecx, [esp + 0x8c]
call fcn.10003960
lea ecx, [esp + 0x64]
call fcn.100037f0
lea esi, [esp + 0x10c]
call fcn.10027b20
xor ebx, ebx
mov eax, dword [esp + 0x24]
cmp eax, ebx
je 0x10005f34
push eax
call ebp
mov ecx, dword [esp + 0x84]
mov esi, 0x10
cmp dword [esp + 0x98], esi
jae 0x10005f50
lea ecx, [esp + 0x84]
cmp dword [esp + 0x1a8], esi
mov eax, dword [esp + 0x194]
jae 0x10005f67
lea eax, [esp + 0x194]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
cmp eax, 1
sete byte [esp + 0x17]
cmp dword [esp + 0x98], esi
jb 0x10005f90
mov ecx, dword [esp + 0x84]
push ecx
call fcn.10040f62
add esp, 4
cmp dword [esp + 0x60], esi
mov dword [esp + 0x98], edi
mov dword [esp + 0x94], ebx
mov byte [esp + 0x84], bl
jb 0x10005fb8
mov edx, dword [esp + 0x4c]
push edx
call fcn.10040f62
add esp, 4
lea esi, [esp + 0x9c]
mov dword [esp + 0x60], edi
mov dword [esp + 0x5c], ebx
mov byte [esp + 0x4c], bl
call fcn.10027b20
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x10005fdf
push eax
call ebp
mov dword [esp + 0x18], ebx
cmp dword [esp + 0x1a8], 0x10
jb 0x10005ff9
mov eax, dword [esp + 0x194]
push eax
call fcn.10040f62
add esp, 4
mov al, byte [esp + 0x17]
jmp 0x100062bd
lea ecx, [esp + 0x80]
call fcn.100037f0
lea ecx, [esp + 0x48]
call fcn.100037f0
lea esi, [esp + 0x9c]
call fcn.10027b20
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x10006032
push eax
call ebp
mov dword [esp + 0x18], ebx
lea ecx, [esp + 0x190]
call fcn.100037f0
xor al, al
jmp 0x100062bd
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 + 0x18c], 0xd
call fcn.1002a310
test al, al
jne 0x100060b9
lea ecx, [esp + 0x64]
call fcn.10006cc0
lea ecx, [esp + 0x80]
call fcn.10006cc0
cmp dword [esp + 0x60], 0x10
jb 0x10005cc5
mov edx, dword [esp + 0x4c]
push edx
call fcn.10040f62
add esp, 4
jmp 0x10005cc5
mov edi, dword [esp + 0x6c]
mov esi, dword [esp + 0x68]
xor ebp, ebp
mov dword [esp + 0x20], ebx
cmp esi, ebx
je 0x10006204
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 0x100061e2
mov ecx, dword [esp + 0x20]
cmp dword [esi + ecx + 0x14], ebx
je 0x10006159
cmp esi, ebx
je 0x10006115
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 0x1000611e
call fcn.10041d26
mov esi, dword [esp + 0x68]
mov edx, dword [esp + 0x20]
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x40], esp
push 0xffffffffffffffff
lea eax, [esi + edx]
push ebx
mov esi, 0xf
mov dword [ecx + 0x18], esi
mov dword [ecx + 0x14], ebx
push eax
mov byte [ecx + 4], bl
call fcn.10003960
call fcn.10005b20
add esp, 0x1c
cmp al, bl
je 0x10006166
mov edi, dword [esp + 0x6c]
mov esi, dword [esp + 0x68]
add ebp, 1
add dword [esp + 0x20], 0x1c
jmp 0x100060c7
lea ecx, [esp + 0x64]
call fcn.10006cc0
lea ecx, [esp + 0x80]
call fcn.10006cc0
mov edi, 0x10
cmp dword [esp + 0x60], edi
jb 0x10006193
mov eax, dword [esp + 0x4c]
push eax
call fcn.10040f62
add esp, 4
mov dword [esp + 0x60], esi
lea esi, [esp + 0x9c]
mov dword [esp + 0x5c], ebx
mov byte [esp + 0x4c], bl
call fcn.10027b20
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x100061be
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0x18], ebx
cmp dword [esp + 0x1a8], edi
jb 0x10005c6a
mov ecx, dword [esp + 0x194]
push ecx
call fcn.10040f62
add esp, 4
xor al, al
jmp 0x100062bd
cmp esi, ebx
je 0x10006204
mov edx, dword [esp + 0x24]
push edx
lea eax, [esp + 0x68]
push eax
push edi
push esi
call fcn.100074f0
mov ecx, dword [esp + 0x78]
push ecx
call fcn.10040f62
add esp, 0x14
mov eax, dword [esp + 0x84]
cmp eax, ebx
mov dword [esp + 0x68], ebx
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x70], ebx
je 0x10006246
mov edx, dword [esp + 0x24]
push edx
mov edx, dword [esp + 0x8c]
lea ecx, [esp + 0x84]
push ecx
push edx
push eax
call fcn.100074f0
mov eax, dword [esp + 0x94]
push eax
call fcn.10040f62
add esp, 0x14
mov edi, 0x10
cmp dword [esp + 0x60], edi
mov dword [esp + 0x84], ebx
mov dword [esp + 0x88], ebx
mov dword [esp + 0x8c], ebx
jb 0x10006273
mov ecx, dword [esp + 0x4c]
push ecx
call fcn.10040f62
add esp, 4
lea esi, [esp + 0x9c]
mov dword [esp + 0x60], 0xf
mov dword [esp + 0x5c], ebx
mov byte [esp + 0x4c], bl
call fcn.10027b20
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x100062a2
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0x18], ebx
cmp dword [esp + 0x1a8], edi
jb 0x100062bb
mov edx, dword [esp + 0x194]
push edx
call fcn.10040f62
add esp, 4
mov al, 1
mov ecx, dword [esp + 0x180]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x168]
xor ecx, esp
call fcn.10040be4
add esp, 0x178
ret