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

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 0xd
push 0
push 0
dec ecx
jne 0x4773bd
push ecx
xchg dword [ebp - 4], ecx
push ebx
push esi
push edi
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x47784d
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x28]
xor edx, edx
call fcn.00404b0c
je 0x4777ff
mov dl, 1
mov eax, dword [0x413798]
call fcn.00403344
mov dword [ebp - 0x1c], eax
xor eax, eax
push ebp
push 0x4777e4
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x60]
mov edx, dword [eax]
call dword [edx + 0x14]
test eax, eax
jle 0x477620
mov dl, 1
mov eax, dword [0x413798]
call fcn.00403344
mov dword [ebp - 0x18], eax
xor eax, eax
push ebp
push 0x477619
push dword fs:[eax]
mov dword fs:[eax], esp
call sub.KERNEL32.DLL_GetEnvironmentStringsA
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x4774a5
xor eax, eax
push ebp
push 0x47749e
push dword fs:[eax]
mov dword fs:[eax], esp
mov ebx, dword [ebp - 0x14]
jmp 0x477482
lea edx, [ebp - 0x30]
mov eax, ebx
call fcn.0040d074
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
call dword [ecx + 0x34]
mov eax, ebx
call fcn.0040ce64
inc eax
add ebx, eax
cmp byte [ebx], 0
jne 0x477463
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4774a5
mov eax, dword [ebp - 0x14]
push eax
call sub.KERNEL32.DLL_FreeEnvironmentStringsA
ret
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x60]
mov edx, dword [eax]
call dword [edx + 0x14]
mov edi, eax
dec edi
test edi, edi
jl 0x477603
inc edi
mov dword [ebp - 0x20], 0
lea ecx, [ebp - 0x34]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x60]
mov edx, dword [ebp - 0x20]
call fcn.004730b0
mov edx, dword [ebp - 0x34]
lea eax, [ebp - 0x24]
call fcn.0040436c
lea eax, [ebp - 0x3c]
mov edx, dword [ebp - 0x24]
call fcn.00404970
mov edx, dword [ebp - 0x3c]
lea ecx, [ebp - 0x38]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x60]
call fcn.00473298
mov edx, dword [ebp - 0x38]
lea eax, [ebp - 0x28]
call fcn.0040436c
push 0
lea eax, [ebp - 0x2c]
call fcn.00404574
push eax
mov eax, dword [ebp - 0x24]
call fcn.00404568
mov ebx, eax
push ebx
call sub.KERNEL32.DLL_GetEnvironmentVariableA
mov edx, eax
lea eax, [ebp - 0x2c]
call fcn.004046d8
cmp dword [ebp - 0x2c], 0
je 0x477549
mov eax, dword [ebp - 0x2c]
call fcn.004043a4
push eax
lea eax, [ebp - 0x2c]
call fcn.00404574
push eax
push ebx
call sub.KERNEL32.DLL_GetEnvironmentVariableA
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x1c]
call fcn.00416b58
mov eax, dword [ebp - 0x18]
mov edx, dword [eax]
call dword [edx + 0x14]
mov esi, eax
dec esi
test esi, esi
jl 0x4775d4
inc esi
xor ebx, ebx
mov al, byte [0x477860]
push eax
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0x48]
mov edx, ebx
mov eax, dword [ebp - 0x18]
call fcn.00416304
mov edx, dword [ebp - 0x48]
lea ecx, [ebp - 0x44]
mov eax, dword [ebp - 0x18]
call fcn.00416490
mov eax, dword [ebp - 0x44]
push eax
push 0x47786c
lea ecx, [ebp - 0x50]
mov edx, ebx
mov eax, dword [ebp - 0x18]
call fcn.00416304
push dword [ebp - 0x50]
push 0x47786c
lea eax, [ebp - 0x4c]
mov edx, 3
call fcn.00404464
mov edx, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x28]
pop ecx
call fcn.004103b4
mov edx, dword [ebp - 0x40]
lea eax, [ebp - 0x28]
call fcn.00404190
inc ebx
dec esi
jne 0x477569
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x18]
call fcn.00416b58
mov eax, dword [ebp - 0x28]
call fcn.00404568
push eax
mov eax, dword [ebp - 0x24]
call fcn.00404568
push eax
call sub.KERNEL32.DLL_SetEnvironmentVariableA
inc dword [ebp - 0x20]
dec edi
jne 0x4774c3
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x477620
mov eax, dword [ebp - 0x18]
call fcn.00403374
ret
xor eax, eax
push ebp
push 0x4777c4
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0xc]
xor edx, edx
call fcn.00404b0c
jne 0x4776a1
lea ecx, [ebp - 0x54]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 4]
call fcn.00477180
mov eax, dword [ebp - 0x54]
call fcn.004049e4
push eax
lea ecx, [ebp - 0x58]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 4]
call fcn.004770f8
mov eax, dword [ebp - 0x58]
call fcn.004049e4
push eax
mov eax, dword [ebp - 4]
movzx eax, byte [eax + 0x58]
mov eax, dword [eax*4 + 0x57b5e0]
push eax
lea ecx, [ebp - 0x5c]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 4]
call fcn.0047709c
mov eax, dword [ebp - 0x5c]
call fcn.004049e4
mov ecx, eax
xor edx, edx
xor eax, eax
call fcn.0046fd88
cmp eax, 0x20
seta byte [ebp - 0xd]
jmp 0x4776f3
lea ecx, [ebp - 0x60]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 4]
call fcn.00477180
mov eax, dword [ebp - 0x60]
push eax
lea ecx, [ebp - 0x64]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 4]
call fcn.004770f8
mov eax, dword [ebp - 0x64]
push eax
mov eax, dword [ebp - 4]
movzx eax, byte [eax + 0x58]
mov eax, dword [eax*4 + 0x57b5e0]
push eax
lea ecx, [ebp - 0x68]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 4]
call fcn.0047709c
mov ecx, dword [ebp - 0x68]
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0xc]
call fcn.00467d58
mov byte [ebp - 0xd], al
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4777ce
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x60]
mov edx, dword [eax]
call dword [edx + 0x14]
test eax, eax
jle 0x4777c3
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x60]
mov edx, dword [eax]
call dword [edx + 0x14]
mov edi, eax
dec edi
test edi, edi
jl 0x477773
inc edi
mov dword [ebp - 0x20], 0
lea ecx, [ebp - 0x6c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x60]
mov edx, dword [ebp - 0x20]
call fcn.004730b0
mov edx, dword [ebp - 0x6c]
lea eax, [ebp - 0x24]
call fcn.0040436c
lea ecx, [ebp - 0x70]
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x1c]
call fcn.00416490
cmp dword [ebp - 0x70], 0
jne 0x47776d
push 0
mov eax, dword [ebp - 0x24]
call fcn.00404568
push eax
call sub.KERNEL32.DLL_SetEnvironmentVariableA
inc dword [ebp - 0x20]
dec edi
jne 0x47772d
mov eax, dword [ebp - 0x1c]
mov edx, dword [eax]
call dword [edx + 0x14]
mov edi, eax
dec edi
test edi, edi
jl 0x4777c3
inc edi
mov dword [ebp - 0x20], 0
lea ecx, [ebp - 0x24]
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x1c]
call fcn.00416304
lea ecx, [ebp - 0x28]
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x1c]
call fcn.00416490
mov eax, dword [ebp - 0x28]
call fcn.00404568
push eax
mov eax, dword [ebp - 0x24]
call fcn.00404568
push eax
call sub.KERNEL32.DLL_SetEnvironmentVariableA
inc dword [ebp - 0x20]
dec edi
jne 0x47778a
ret
mov byte [ebp - 0xd], 0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x477854
lea eax, [ebp - 0x70]
call fcn.004040f8
lea eax, [ebp - 0x6c]
mov edx, 7
call fcn.004047c0
lea eax, [ebp - 0x50]
mov edx, 5
call fcn.0040411c
lea eax, [ebp - 0x3c]
mov edx, 3
call fcn.004047c0
lea eax, [ebp - 0x30]
mov edx, 4
call fcn.0040411c
ret