Function at 0x40c424
Capabilities:
Query environment variable
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xec
push edi
push esi
push ebx
mov ebx, dword [ebp + 8]
add esp, 0xfffffff4
push 0x7d0
call fcn.00415f94
mov dword [ebp - 0xd4], eax
mov edi, ebx
mov al, 0
cld
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
lea esi, [ebx + ecx - 0xa]
mov edi, 0x40c3cb
mov ecx, 0xa
cld
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x40c46d
sbb eax, eax
or al, 1
add esp, 0x10
test eax, eax
jne 0x40c488
mov edi, ebx
mov al, 0
cld
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
lea edi, [ecx - 0xb]
jmp 0x40c499
mov edi, ebx
mov al, 0
cld
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
lea edi, [ecx - 0xa]
add esp, 0xfffffffc
push edi
push ebx
mov eax, dword [ebp - 0xd4]
push eax
call sub.msvcrt.dll_strncpy
mov eax, dword [ebp - 0xd4]
mov byte [edi + eax], 0
add esp, 0xfffffff4
push 0x4000
call fcn.00415f94
mov esi, eax
add esp, 0x20
add esp, 0xfffffff4
push 0x4000
call fcn.00415f94
mov dword [ebp - 0xd8], eax
add esp, 0xfffffffc
push 0x4000
push eax
push 0x40c3d5
call sub.KERNEL32.dll_GetEnvironmentVariableA
add esp, 0xfffffffc
mov eax, dword [ebp - 0xd8]
push eax
push esi
call sub.msvcrt.dll_strcpy
add esp, 0x20
add esp, 0xfffffff8
push 0x40b63d
push esi
call sub.msvcrt.dll_strcat
add esp, 0xfffffff8
mov eax, dword [ebp - 0xd4]
push eax
push esi
call sub.msvcrt.dll_strcat
add esp, 0x20
add esp, 0xfffffff8
push esi
push 0x40c3d5
call sub.KERNEL32.dll_SetEnvironmentVariableA
add esp, 8
test eax, eax
je 0x40c540
add esp, 0xfffffff8
push esi
push 0x40c3da
jmp 0x40c54f
add esp, 0xfffffffc
call sub.KERNEL32.dll_GetLastError
push eax
push esi
push 0x40c3f4
call fcn.00407210
add esp, 0x10
add esp, 0xfffffff4
push 0x4000
call fcn.00415f94
mov dword [ebp - 0xdc], eax
add esp, 0xfffffffc
push esi
push 0x40c419
push eax
call sub.msvcrt.dll_sprintf
add esp, 0x20
add esp, 0xfffffff4
mov eax, dword [ebp - 0xdc]
push eax
call sub.msvcrt.dll__putenv
mov dword [ebp - 0xe0], 0
add esp, 0xfffffffc
push 0xc8
lea ebx, [ebp - 0xd0]
push ebx
push 0x98
call fcn.00401aa8
mov edi, ebx
mov al, 0
cld
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
add esp, 0x20
cmp ecx, 0xfffffffe
je 0x40c5db
add esp, 0xfffffff8
push ebx
mov eax, dword [ebp - 0xd4]
push eax
call fcn.0040c318
mov dword [ebp - 0xe0], eax
add esp, 0x10
xor ebx, ebx
cmp dword [ebp - 0xe0], 0
jne 0x40c696
mov esi, esi
add esp, 0xfffffff8
push dword [ebx*4 + 0x40c8c4]
mov eax, dword [ebp - 0xd4]
push eax
call fcn.0040c318
mov dword [ebp - 0xe0], eax
add esp, 0x10
inc ebx
cmp ebx, 4
jg 0x40c615
test eax, eax
je 0x40c5ec
cmp dword [ebp - 0xe0], 0
jne 0x40c696
add esp, 0xfffffff8
mov eax, dword [ebp - 0xd8]
push eax
push 0x40c3d5
call sub.KERNEL32.dll_SetEnvironmentVariableA
add esp, 8
test eax, eax
je 0x40c64c
add esp, 0xfffffff8
mov eax, dword [ebp - 0xd8]
push eax
push 0x40c3da
jmp 0x40c661
add esp, 0xfffffffc
call sub.KERNEL32.dll_GetLastError
push eax
mov eax, dword [ebp - 0xd8]
push eax
push 0x40c3f4
call fcn.00407210
add esp, 0x10
add esp, 0xfffffffc
mov eax, dword [ebp - 0xd8]
push eax
push 0x40c419
mov eax, dword [ebp - 0xdc]
push eax
call sub.msvcrt.dll_sprintf
add esp, 0xfffffff4
mov eax, dword [ebp - 0xdc]
push eax
call sub.msvcrt.dll__putenv
add esp, 0x20
add esp, 0xfffffff4
push esi
call fcn.004160b0
add esp, 0xfffffff4
mov eax, dword [ebp - 0xd8]
push eax
call fcn.004160b0
add esp, 0x20
add esp, 0xfffffff4
mov eax, dword [ebp - 0xdc]
push eax
call fcn.004160b0
add esp, 0xfffffff4
mov eax, dword [ebp - 0xd4]
push eax
call fcn.004160b0
mov eax, dword [ebp - 0xe0]
lea esp, [ebp - 0xf8]
pop ebx
pop esi
pop edi
leave
ret