Function at 0x1006381a
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
mov ebx, dword [ebp + 8]
push esi
test ebx, ebx
jne 0x1006383e
call fcn.10050167
mov dword [eax], 0x16
or eax, 0xffffffff
jmp 0x10063a8a
push edi
push 0x3d
push ebx
mov edi, ebx
call fcn.1006be27
mov dword [ebp - 0xc], eax
pop ecx
pop ecx
test eax, eax
je 0x10063a74
cmp eax, ebx
je 0x10063a74
movzx ecx, word [eax + 2]
mov eax, ecx
mov dword [ebp - 0x10], eax
mov dword [ebp - 8], eax
call fcn.10063b57
mov esi, dword [0x1008a614]
xor ebx, ebx
test esi, esi
jne 0x10063912
mov eax, dword [0x1008a610]
cmp dword [ebp + 0xc], ebx
je 0x100638b6
test eax, eax
je 0x100638b6
call fcn.100592f5
test eax, eax
jne 0x100638a9
call fcn.10050167
mov dword [eax], 0x16
or ebx, 0xffffffff
jmp 0x10063a59
call fcn.10063b57
mov esi, dword [0x1008a614]
jmp 0x1006390e
cmp word [ebp - 8], bx
je 0x10063a59
test eax, eax
jne 0x100638ed
push 4
push 1
call fcn.1005bcc1
push ebx
mov dword [0x1008a610], eax
call fcn.1005bd24
add esp, 0xc
cmp dword [0x1008a610], ebx
je 0x100638a1
mov esi, dword [0x1008a614]
test esi, esi
jne 0x10063912
push 4
push 1
call fcn.1005bcc1
push ebx
mov dword [0x1008a614], eax
call fcn.1005bd24
mov esi, dword [0x1008a614]
add esp, 0xc
test esi, esi
je 0x100638a1
test esi, esi
je 0x100638a1
mov ecx, dword [ebp - 0xc]
mov eax, edi
sub ecx, eax
sar ecx, 1
push ecx
push eax
mov dword [ebp - 0xc], ecx
call fcn.10063b71
mov dword [ebp - 4], eax
pop ecx
pop ecx
test eax, eax
js 0x1006397a
cmp dword [esi], ebx
je 0x1006397a
push dword [esi + eax*4]
call fcn.1005bd24
pop ecx
mov ecx, dword [ebp - 4]
cmp word [ebp - 8], bx
je 0x10063959
mov eax, dword [ebp + 8]
mov edi, ebx
mov dword [esi + ecx*4], eax
jmp 0x100639d1
mov eax, dword [esi + ecx*4 + 4]
mov dword [esi + ecx*4], eax
inc ecx
cmp dword [esi + ecx*4], ebx
jne 0x10063951
push 4
push ecx
push esi
call fcn.10063bd4
push ebx
mov esi, eax
call fcn.1005bd24
add esp, 0x10
mov eax, edi
test esi, esi
je 0x100639d1
jmp 0x100639cb
cmp word [ebp - 8], bx
je 0x10063a59
neg eax
mov dword [ebp - 4], eax
lea ecx, [eax + 2]
cmp ecx, eax
jb 0x100638a1
cmp ecx, 0x3fffffff
jae 0x100638a1
push 4
push ecx
push esi
call fcn.10063bd4
push ebx
mov esi, eax
call fcn.1005bd24
add esp, 0x10
test esi, esi
je 0x100638a1
mov ecx, dword [ebp - 4]
mov edi, ebx
mov eax, dword [ebp + 8]
mov dword [esi + ecx*4], eax
mov dword [esi + ecx*4 + 4], ebx
mov dword [0x1008a614], esi
cmp dword [ebp + 0xc], ebx
je 0x10063a6a
mov ecx, eax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x100639df
sub ecx, edx
sar ecx, 1
push 2
lea eax, [ecx + 2]
push eax
mov dword [ebp - 8], eax
call fcn.1005bcc1
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x10063a0c
push ebx
call fcn.1005bd24
jmp 0x10063a58
push dword [ebp + 8]
push dword [ebp - 8]
push esi
call fcn.10051be8
add esp, 0xc
test eax, eax
jne 0x10063a8e
mov eax, dword [ebp - 0xc]
inc eax
lea ecx, [esi + eax*2]
xor eax, eax
mov word [ecx - 2], ax
mov eax, dword [ebp - 0x10]
movzx eax, ax
neg eax
sbb eax, eax
and eax, ecx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
test eax, eax
jne 0x10063a63
call fcn.10050167
push esi
mov dword [eax], 0x2a
call fcn.1005bd24
or ebx, 0xffffffff
pop ecx
push edi
call fcn.1005bd24
mov eax, ebx
jmp 0x10063a88
push esi
call fcn.1005bd24
pop ecx
push edi
call fcn.1005bd24
xor eax, eax
jmp 0x10063a88
call fcn.10050167
push ebx
mov dword [eax], 0x16
call fcn.1005bd24
or eax, 0xffffffff
pop ecx
pop edi
pop esi
pop ebx
leave
ret
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.1005041b
int3