Function at 0x10012f09
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1006b642
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc4
and dword [ebp - 0x48], 0
mov dword [ebp - 0x40], 0x5c6f1bf5
mov dword [ebp - 0x5c], 0xffffffff
mov dword [ebp - 0x4c], 0xaced45b0
mov dword [ebp - 0xac], 0x648bd921
mov eax, 0xeb89ba0
test eax, eax
je 0x10012f95
mov byte [ebp - 0x14], 0
movzx eax, byte [ebp - 0x14]
test eax, eax
je 0x10012f8c
push 0x61ea
push 0x1940
push 0x6b9
push 0x7101
push 0x431b
push 0x39a5
push 0x7fd6
push 1
call fcn.1001291f
add esp, 0x20
mov eax, dword [ebp - 0x40]
inc eax
mov dword [ebp - 0x40], eax
jmp 0x10012fb6
mov dword [ebp - 0x60], 1
push 1
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x5c]
push eax
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x4c]
push eax
call fcn.10012b22
add esp, 0x14
xor eax, eax
mov word [ebp - 0x44], ax
lea eax, [ebp - 0x44]
push eax
mov eax, dword [ebp + 0xc]
shr eax, 1
inc eax
push eax
lea ecx, [ebp - 0x6c]
call fcn.100149c6
and dword [ebp - 4], 0
mov dword [ebp - 0x30], 0x8cff0ea7
mov dword [ebp - 0x30], 0x12
jmp 0x10012fea
mov eax, dword [ebp - 0x30]
inc eax
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0x1b
jge 0x10013028
mov byte [ebp - 0x17], 0
movzx eax, byte [ebp - 0x17]
test eax, eax
je 0x10013006
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov byte [ebp - 0x16], 0
movzx eax, byte [ebp - 0x16]
test eax, eax
je 0x10013026
push 0x3d1a
push 1
push 0x1506
call fcn.10012bc9
add esp, 0xc
jmp 0x10012fe3
and dword [ebp - 0x34], 0
and dword [ebp - 0x38], 0
lea ecx, [ebp - 0x6c]
call fcn.10014a52
dec eax
mov dword [ebp - 0x58], eax
jmp 0x10013045
mov eax, dword [ebp - 0x38]
inc eax
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x38]
cmp eax, dword [ebp - 0x58]
jae 0x10013333
push 3
lea ecx, [ebp - 0x78]
call fcn.10014761
mov byte [ebp - 4], 1
mov dword [ebp - 0x20], 0x7d8a8701
push 0xaa8
lea eax, [ebp - 0x90]
push eax
lea eax, [ebp - 0x78]
push eax
push 1
call fcn.10012c35
add esp, 0x10
mov dword [ebp - 0x20], 2
jmp 0x10013090
mov eax, dword [ebp - 0x20]
dec eax
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jl 0x10013105
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x1c], 2
jmp 0x100130ad
mov eax, dword [ebp - 0x1c]
dec eax
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jl 0x100130e7
mov byte [ebp - 0x11], 0
movzx eax, byte [ebp - 0x11]
test eax, eax
je 0x100130d3
push 0x7f68
push 1
push 0x3471
call fcn.10012cb6
add esp, 0xc
push dword [ebp - 0x1c]
lea ecx, [ebp - 0x78]
call fcn.100147ff
cmp dword [eax], 0
je 0x100130e5
jmp 0x100130a6
jmp 0x100130a6
push 0x4cc5
push 0x4446
lea eax, [ebp - 0x78]
push eax
lea eax, [ebp - 0x20]
push eax
push 1
call fcn.10012d3a
add esp, 0x14
jmp 0x10013089
mov byte [ebp - 0x12], 0
movzx eax, byte [ebp - 0x12]
test eax, eax
je 0x1001311f
push 0x2ac7
push 1
call fcn.10012dd3
pop ecx
pop ecx
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x78]
call fcn.100147e3
push dword [ebp - 0x38]
lea ecx, [ebp - 0x6c]
call fcn.10014a5a
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x24], 0
jmp 0x10013149
mov eax, dword [ebp - 0x24]
inc eax
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 1
jge 0x1001315f
mov eax, dword [ebp - 0x24]
mov dword [ebp + eax*4 - 0x94], 0
jmp 0x10013142
mov byte [ebp - 0x13], 0
movzx eax, byte [ebp - 0x13]
test eax, eax
je 0x10013173
push 0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 1
call fcn.10012e03
pop ecx
and dword [ebp - 0x3c], 0
jmp 0x1001318f
mov eax, dword [ebp - 0x3c]
inc eax
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x34]
inc eax
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x3c], 2
jae 0x1001332e
mov dword [ebp - 0x28], 5
mov dword [ebp - 0xb0], 0xffffffff
mov dword [ebp - 0x98], 0xfffffffb
or dword [ebp - 0x8c], 0xffffffff
or dword [ebp - 0x88], 0xffffffff
or dword [ebp - 0x84], 0xffffffff
or dword [ebp - 0x80], 0xffffffff
lea ecx, [ebp - 0x41]
call fcn.10008a08
push eax
lea eax, [ebp - 0x7c]
push eax
lea eax, [ebp - 0x8c]
push eax
lea ecx, [ebp - 0xc4]
call fcn.1001480e
push dword [eax + 4]
push dword [eax]
lea ecx, [ebp - 0xbc]
call fcn.100147bd
mov byte [ebp - 4], 2
mov dword [ebp - 0xa8], 0xffffffff
mov dword [ebp - 0x50], 0xbffb
push 3
lea ecx, [ebp - 0xa4]
call fcn.10014761
mov byte [ebp - 4], 3
mov dword [ebp - 0x10], 0
jmp 0x10013232
mov eax, dword [ebp - 0x10]
inc eax
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 3
jge 0x10013248
mov eax, dword [ebp - 0x10]
mov dword [ebp + eax*4 - 0xd0], 1
jmp 0x1001322b
mov dword [ebp - 0x10], 0
jmp 0x10013258
mov eax, dword [ebp - 0x10]
inc eax
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 3
jge 0x10013274
push dword [ebp - 0x10]
lea ecx, [ebp - 0xa4]
call fcn.100147ff
mov dword [eax], 0xfffffff8
jmp 0x10013251
mov dword [ebp - 0x28], 0
jmp 0x10013284
mov eax, dword [ebp - 0x28]
inc eax
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 8
je 0x100132bf
mov dword [ebp - 0x2c], 0xffffffff
mov dword [ebp - 0x2c], 0
jmp 0x100132a1
mov eax, dword [ebp - 0x2c]
inc eax
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 5
jg 0x100132bd
mov byte [ebp - 0x15], 0
movzx eax, byte [ebp - 0x15]
test eax, eax
je 0x100132bb
push 1
call fcn.10012e6a
pop ecx
jmp 0x1001329a
jmp 0x1001327d
push 1
lea eax, [ebp - 0x50]
push eax
push 0x5be3
push 0x46e9
call fcn.10012e9c
add esp, 0x10
mov byte [ebp - 4], 2
lea ecx, [ebp - 0xa4]
call fcn.100147e3
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xbc]
call fcn.100147e3
mov eax, dword [ebp + 0x10]
add eax, dword [ebp - 0x34]
xor edx, edx
div dword [0x100715bc]
mov eax, dword [ebp + 0x14]
mov eax, dword [eax + 4]
movzx edx, byte [eax + edx]
mov eax, dword [ebp + 0x10]
add eax, dword [ebp - 0x34]
mov ecx, dword [ebp + 0x14]
mov ecx, dword [ecx]
movzx ecx, byte [ecx + eax]
call fcn.10008b78
mov ecx, dword [ebp - 0x54]
add ecx, dword [ebp - 0x3c]
mov byte [ecx], al
jmp 0x10013181
jmp 0x1001303e
lea eax, [ebp - 0x6c]
push eax
mov ecx, dword [ebp + 8]
call fcn.100149e8
mov eax, dword [ebp - 0x48]
or eax, 1
mov dword [ebp - 0x48], eax
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x6c]
call fcn.10014a4d
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret