Function at 0x4173ed
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 0x417411
call fcn.00414788
mov dword [eax], 0x16
or eax, 0xffffffff
jmp 0x41765d
push edi
push 0x3d
push ebx
mov edi, ebx
call fcn.0040a6a4
mov dword [ebp - 0xc], eax
pop ecx
pop ecx
test eax, eax
je 0x417647
cmp eax, ebx
je 0x417647
movzx ecx, word [eax + 2]
mov eax, ecx
mov dword [ebp - 0x10], eax
mov dword [ebp - 8], eax
call fcn.0041772a
mov esi, dword [0x457e38]
xor ebx, ebx
test esi, esi
jne 0x4174e5
mov eax, dword [0x457e34]
cmp dword [ebp + 0xc], ebx
je 0x417489
test eax, eax
je 0x417489
call fcn.0041178a
test eax, eax
jne 0x41747c
call fcn.00414788
mov dword [eax], 0x16
or ebx, 0xffffffff
jmp 0x41762c
call fcn.0041772a
mov esi, dword [0x457e38]
jmp 0x4174e1
cmp word [ebp - 8], bx
je 0x41762c
test eax, eax
jne 0x4174c0
push 4
push 1
call fcn.00415ff2
push ebx
mov dword [0x457e34], eax
call fcn.0041479b
add esp, 0xc
cmp dword [0x457e34], ebx
je 0x417474
mov esi, dword [0x457e38]
test esi, esi
jne 0x4174e5
push 4
push 1
call fcn.00415ff2
push ebx
mov dword [0x457e38], eax
call fcn.0041479b
mov esi, dword [0x457e38]
add esp, 0xc
test esi, esi
je 0x417474
test esi, esi
je 0x417474
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.00417744
mov dword [ebp - 4], eax
pop ecx
pop ecx
test eax, eax
js 0x41754d
cmp dword [esi], ebx
je 0x41754d
push dword [esi + eax*4]
call fcn.0041479b
pop ecx
mov ecx, dword [ebp - 4]
cmp word [ebp - 8], bx
je 0x41752c
mov eax, dword [ebp + 8]
mov edi, ebx
mov dword [esi + ecx*4], eax
jmp 0x4175a4
mov eax, dword [esi + ecx*4 + 4]
mov dword [esi + ecx*4], eax
inc ecx
cmp dword [esi + ecx*4], ebx
jne 0x417524
push 4
push ecx
push esi
call fcn.0041abac
push ebx
mov esi, eax
call fcn.0041479b
add esp, 0x10
mov eax, edi
test esi, esi
je 0x4175a4
jmp 0x41759e
cmp word [ebp - 8], bx
je 0x41762c
neg eax
mov dword [ebp - 4], eax
lea ecx, [eax + 2]
cmp ecx, eax
jb 0x417474
cmp ecx, 0x3fffffff
jae 0x417474
push 4
push ecx
push esi
call fcn.0041abac
push ebx
mov esi, eax
call fcn.0041479b
add esp, 0x10
test esi, esi
je 0x417474
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 [0x457e38], esi
cmp dword [ebp + 0xc], ebx
je 0x41763d
mov ecx, eax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x4175b2
sub ecx, edx
sar ecx, 1
push 2
lea eax, [ecx + 2]
push eax
mov dword [ebp - 8], eax
call fcn.00415ff2
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x4175df
push ebx
call fcn.0041479b
jmp 0x41762b
push dword [ebp + 8]
push dword [ebp - 8]
push esi
call fcn.0040c870
add esp, 0xc
test eax, eax
jne 0x417661
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 0x417636
call fcn.00414788
push esi
mov dword [eax], 0x2a
call fcn.0041479b
or ebx, 0xffffffff
pop ecx
push edi
call fcn.0041479b
mov eax, ebx
jmp 0x41765b
push esi
call fcn.0041479b
pop ecx
push edi
call fcn.0041479b
xor eax, eax
jmp 0x41765b
call fcn.00414788
push ebx
mov dword [eax], 0x16
call fcn.0041479b
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.0040c83c
int3