Function at 0x40f34d
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
mov esi, dword [ebp + 8]
test esi, esi
jne 0x40f371
call fcn.00409493
mov dword [eax], 0x16
or eax, 0xffffffff
jmp 0x40f5c9
push edi
push 0x3d
push esi
mov edi, esi
call fcn.0041bd64
mov dword [ebp - 0x10], eax
pop ecx
pop ecx
test eax, eax
je 0x40f5b3
cmp eax, esi
je 0x40f5b3
movzx ecx, word [eax + 2]
mov eax, ecx
mov dword [ebp - 0x14], eax
mov dword [ebp - 0xc], eax
call fcn.0040f760
mov eax, dword [0x4500d0]
xor ebx, ebx
mov dword [ebp - 4], eax
test eax, eax
jne 0x40f44a
mov eax, dword [0x4500cc]
cmp dword [ebp + 0xc], ebx
je 0x40f3ee
test eax, eax
je 0x40f3ee
call fcn.00405c9f
test eax, eax
jne 0x40f3df
call fcn.00409493
mov dword [eax], 0x16
or ebx, 0xffffffff
push esi
jmp 0x40f599
call fcn.0040f760
mov eax, dword [0x4500d0]
mov dword [ebp - 4], eax
jmp 0x40f446
cmp word [ebp - 0xc], bx
je 0x40f3d9
test eax, eax
jne 0x40f423
push 4
push 1
call fcn.004081b4
push ebx
mov dword [0x4500cc], eax
call fcn.00406c33
add esp, 0xc
cmp dword [0x4500cc], ebx
je 0x40f3d6
mov eax, dword [0x4500d0]
mov dword [ebp - 4], eax
test eax, eax
jne 0x40f44a
push 4
push 1
call fcn.004081b4
push ebx
mov dword [0x4500d0], eax
call fcn.00406c33
mov eax, dword [0x4500d0]
add esp, 0xc
mov dword [ebp - 4], eax
test eax, eax
je 0x40f3d6
test eax, eax
je 0x40f3d6
mov eax, dword [ebp - 0x10]
sub eax, esi
sar eax, 1
push eax
push esi
mov dword [ebp - 0x10], eax
call fcn.0040f7cf
pop ecx
pop ecx
mov ecx, eax
mov eax, dword [ebp - 4]
mov dword [ebp - 8], ecx
test ecx, ecx
js 0x40f4b9
cmp dword [eax], ebx
je 0x40f4b9
push dword [eax + ecx*4]
call fcn.00406c33
mov edx, dword [ebp - 8]
pop ecx
cmp word [ebp - 0xc], bx
jne 0x40f4af
mov ecx, dword [ebp - 4]
jmp 0x40f48c
mov eax, dword [ecx + edx*4 + 4]
mov dword [ecx + edx*4], eax
inc edx
cmp dword [ecx + edx*4], ebx
jne 0x40f484
push 4
push edx
push ecx
call fcn.00410b7e
push ebx
mov dword [ebp - 0xc], eax
call fcn.00406c33
mov eax, dword [ebp - 0xc]
add esp, 0x10
test eax, eax
je 0x40f510
jmp 0x40f50b
mov eax, dword [ebp - 4]
mov edi, ebx
mov dword [eax + edx*4], esi
jmp 0x40f510
cmp word [ebp - 0xc], bx
je 0x40f3d9
neg ecx
mov dword [ebp - 8], ecx
lea edx, [ecx + 2]
cmp edx, ecx
jb 0x40f3d6
cmp edx, 0x3fffffff
jae 0x40f3d6
push 4
push edx
push eax
call fcn.00410b7e
push ebx
mov dword [ebp - 0xc], eax
call fcn.00406c33
mov eax, dword [ebp - 0xc]
add esp, 0x10
test eax, eax
je 0x40f3d6
mov edx, dword [ebp - 8]
mov edi, ebx
mov dword [eax + edx*4], esi
mov dword [eax + edx*4 + 4], ebx
mov dword [0x4500d0], eax
cmp dword [ebp + 0xc], ebx
je 0x40f5a9
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
cmp ax, bx
jne 0x40f51c
sub esi, ecx
sar esi, 1
push 2
lea eax, [esi + 2]
push eax
mov dword [ebp - 0xc], eax
call fcn.004081b4
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x40f549
push ebx
call fcn.00406c33
jmp 0x40f597
push dword [ebp + 8]
push dword [ebp - 0xc]
push esi
call fcn.004090d4
add esp, 0xc
test eax, eax
jne 0x40f5cd
mov eax, dword [ebp - 0x10]
xor edx, edx
lea ecx, [eax + 1]
mov word [esi + eax*2], dx
mov eax, dword [ebp - 0x14]
lea ecx, [esi + ecx*2]
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 0x40f5a2
call fcn.00409493
push esi
mov dword [eax], 0x2a
call fcn.00406c33
or ebx, 0xffffffff
pop ecx
push edi
call fcn.00406c33
mov eax, ebx
jmp 0x40f5c7
push esi
call fcn.00406c33
pop ecx
push edi
call fcn.00406c33
xor eax, eax
jmp 0x40f5c7
call fcn.00409493
push esi
mov dword [eax], 0x16
call fcn.00406c33
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.00407ea0
int3