Function at 0x413c94
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
mov dword [ebp - 8], ebx
push edi
test eax, eax
jne 0x413cc7
call fcn.0040aa45
push ebx
push ebx
push ebx
push ebx
push ebx
mov dword [eax], 0x16
call fcn.0040aa9b
add esp, 0x14
or eax, 0xffffffff
jmp 0x413d34
mov ebx, dword [eax]
push esi
test ebx, ebx
je 0x413d25
push 0x3d
push ebx
call fcn.004143e9
mov esi, eax
mov dword [ebp - 0xc], esi
pop ecx
pop ecx
test esi, esi
je 0x413d25
cmp ebx, esi
je 0x413d25
mov al, byte [esi + 1]
mov edi, dword [0x415f40]
mov byte [ebp - 1], al
cmp edi, dword [0x415f74]
jne 0x413d0b
push edi
call fcn.00413f05
mov edi, eax
mov al, byte [ebp - 1]
pop ecx
mov dword [0x415f40], edi
test edi, edi
jne 0x413d7b
cmp dword [ebp + 0xc], edi
je 0x413d38
cmp dword [0x415f44], edi
je 0x413d38
call fcn.0041393b
test eax, eax
je 0x413d71
call fcn.0040aa45
mov dword [eax], 0x16
or eax, 0xffffffff
pop esi
pop edi
pop ebx
leave
ret
test al, al
je 0x413efe
push 4
call fcn.0040ae7a
mov dword [0x415f40], eax
pop ecx
test eax, eax
je 0x413d30
and dword [eax], 0
cmp dword [0x415f44], 0
jne 0x413d71
push 4
call fcn.0040ae7a
mov dword [0x415f44], eax
pop ecx
test eax, eax
je 0x413d30
and dword [eax], 0
mov edi, dword [0x415f40]
test edi, edi
je 0x413d30
mov eax, esi
sub eax, ebx
push eax
push ebx
call fcn.00413f67
mov esi, eax
pop ecx
pop ecx
test esi, esi
js 0x413df6
cmp dword [edi], 0
je 0x413df6
mov eax, dword [edi + esi*4]
cmp eax, dword [0x415f74]
jb 0x413da6
cmp eax, dword [0x417884]
jbe 0x413dad
push eax
call fcn.0040af8f
pop ecx
cmp byte [ebp - 1], 0
je 0x413dc9
mov dword [edi + esi*4], ebx
mov edi, dword [ebp + 8]
and dword [edi], 0
jmp 0x413e48
mov eax, dword [edi + esi*4 + 4]
mov dword [edi + esi*4], eax
inc esi
cmp dword [edi + esi*4], 0
jne 0x413dc1
cmp esi, 0x3fffffff
jae 0x413e45
push 4
push esi
push dword [0x415f40]
call fcn.00411b2d
mov edi, dword [ebp + 8]
add esp, 0xc
test eax, eax
je 0x413e48
mov dword [0x415f40], eax
jmp 0x413e48
cmp byte [ebp - 1], 0
je 0x413ef1
test esi, esi
jns 0x413e06
neg esi
lea eax, [esi + 2]
cmp eax, esi
jl 0x413d30
cmp eax, 0x3fffffff
jae 0x413d30
push eax
push 4
push dword [0x415f40]
call fcn.00411b2d
add esp, 0xc
test eax, eax
je 0x413d30
mov edi, dword [ebp + 8]
and dword [eax + esi*4 + 4], 0
mov dword [eax + esi*4], ebx
and dword [edi], 0
jmp 0x413def
mov edi, dword [ebp + 8]
cmp dword [ebp + 0xc], 0
je 0x413ed9
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x413e57
sub ecx, edx
push 1
lea eax, [ecx + 2]
push eax
call fcn.0040e711
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x413ed9
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x413e78
sub ecx, edx
push ebx
lea eax, [ecx + 2]
push eax
push esi
call fcn.0040d90f
add esp, 0xc
test eax, eax
je 0x413ea2
xor eax, eax
push eax
push eax
push eax
push eax
push eax
call fcn.0040aaa0
add esp, 0x14
movsx eax, byte [ebp - 1]
mov ecx, esi
sub ecx, ebx
add ecx, dword [ebp - 0xc]
mov byte [ecx], 0
inc ecx
neg eax
sbb eax, eax
and eax, ecx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
test eax, eax
jne 0x413ed2
or dword [ebp - 8], 0xffffffff
call fcn.0040aa45
mov dword [eax], 0x2a
push esi
call fcn.0040af8f
pop ecx
cmp byte [ebp - 1], 0
jne 0x413ee9
push ebx
call fcn.0040af8f
and dword [edi], 0
pop ecx
mov eax, dword [ebp - 8]
jmp 0x413d33
push ebx
call fcn.0040af8f
mov edi, dword [ebp + 8]
pop ecx
and dword [edi], 0
xor eax, eax
jmp 0x413d33