Function at 0x404771
Capabilities:
Set environment variable

Disassembly:
push ebp
lea ebp, [esp - 0x68]
sub esp, 0x8a8
push ebx
push esi
mov esi, dword [0x412260]
xor ebx, ebx
cmp esi, ebx
je 0x404b4f
push edi
push 0x7fe
lea eax, [ebp - 0x83e]
push ebx
push eax
mov word [ebp - 0x840], bx
call sub.MSVCRT.dll_memset
push 0x9e
lea eax, [ebp - 0x3e]
push ebx
push eax
mov word [ebp - 0x40], bx
call sub.MSVCRT.dll_memset
mov edi, dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x18
cmp byte [ebp + 0x70], 9
jbe 0x4047e8
cmp dword [ebp + 0x78], ebx
jne 0x4047e8
movzx eax, byte [ebp + 0x7c]
push eax
lea eax, [ebp - 0x40]
push 0x4017b4
push eax
call edi
mov esi, dword [0x412260]
add esp, 0xc
movzx eax, byte [ebp + 0x70]
cmp eax, 0x12
ja case.default.0x4047f5
jmp dword [eax*4 + 0x404b59]
cmp esi, ebx
je case.default.0x4047f5
add esi, 0x10
cmp dword [ebp + 0x78], ebx
jne 0x404b42
mov ebx, dword [0x412260]
add ebx, 0xb0
jmp 0x404b42
mov eax, dword [0x412264]
cmp eax, ebx
je case.default.0x4047f5
mov ecx, dword [ebp + 0x74]
imul ecx, ecx, 0x368
add eax, ecx
cmp dword [ebp + 0x78], ebx
lea esi, [eax + 0x10]
jne 0x404b42
lea ebx, [eax + 0xb0]
jmp 0x404b42
mov eax, dword [0x412268]
cmp eax, ebx
je case.default.0x4047f5
mov ecx, dword [ebp + 0x74]
imul ecx, ecx, 0x4cc
jmp 0x404837
mov eax, dword [0x412270]
cmp eax, ebx
je case.default.0x4047f5
mov ecx, dword [ebp + 0x74]
imul ecx, ecx, 0x8b4
jmp 0x404837
mov eax, dword [0x412274]
cmp eax, ebx
je case.default.0x4047f5
mov esi, dword [ebp + 0x74]
imul esi, esi, 0x364
add eax, esi
cmp dword [ebp + 0x78], ebx
lea ecx, [eax + 0x10]
mov dword [ebp + 0x64], esi
mov dword [ebp + 0x60], ecx
jne 0x4048b4
lea ebx, [eax + 0xb0]
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push ebx
push dword [ebp + 0x60]
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov eax, dword [0x412274]
push 0x401af4
lea eax, [esi + eax + 0x10]
push eax
lea eax, [ebp - 0x840]
push 0x401ae8
push eax
call edi
xor ebx, ebx
add esp, 0x10
cmp dword [ebp + 0x78], ebx
lea esi, [ebp - 0x840]
jne 0x404b46
mov eax, dword [0x412274]
mov ecx, dword [ebp + 0x64]
movzx eax, byte [ecx + eax + 0x35c]
push eax
lea eax, [ebp - 0x40]
push 0x4017b4
push eax
call edi
add esp, 0xc
lea ebx, [ebp - 0x40]
jmp 0x404b46
mov eax, dword [0x41227c]
cmp eax, ebx
je case.default.0x4047f5
mov esi, dword [ebp + 0x74]
imul esi, esi, 0x368
add eax, esi
cmp dword [ebp + 0x78], ebx
lea ecx, [eax + 0x10]
mov dword [ebp + 0x64], esi
mov dword [ebp + 0x60], ecx
jne 0x40494a
lea ebx, [eax + 0xb0]
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push ebx
push dword [ebp + 0x60]
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov eax, dword [0x41227c]
push 0x401af4
lea eax, [esi + eax + 0x10]
push eax
lea eax, [ebp - 0x840]
push 0x401ae8
push eax
call edi
xor ebx, ebx
add esp, 0x10
cmp dword [ebp + 0x78], ebx
lea esi, [ebp - 0x840]
jne 0x404b46
mov eax, dword [0x41227c]
mov ecx, dword [ebp + 0x64]
jmp 0x4048f7
mov eax, dword [0x412278]
cmp eax, ebx
je case.default.0x4047f5
mov ecx, dword [ebp + 0x74]
imul ecx, ecx, 0x154
jmp 0x404837
mov eax, dword [0x412280]
cmp eax, ebx
je case.default.0x4047f5
mov ecx, dword [ebp + 0x74]
imul ecx, ecx, 0x3560
jmp 0x404837
mov eax, dword [0x412284]
cmp eax, ebx
je case.default.0x4047f5
mov ecx, dword [ebp + 0x74]
imul ecx, ecx, 0x2b0
cmp dword [ebp + 0x78], ebx
lea esi, [ecx + eax]
jne 0x404b42
push dword [esi + 0xa0]
lea eax, [ebp - 0x40]
push 0x4017b4
push eax
call edi
add esp, 0xc
jmp 0x404b3f
mov eax, dword [0x412294]
cmp eax, ebx
je case.default.0x4047f5
mov ecx, dword [ebp + 0x74]
imul ecx, ecx, 0xb8
add eax, ecx
cmp dword [ebp + 0x78], ebx
lea esi, [eax + 0x10]
jne 0x404b42
push dword [eax + 0xb0]
jmp 0x4049f0
mov eax, dword [0x412274]
cmp eax, ebx
je case.default.0x4047f5
mov ecx, dword [ebp + 0x74]
imul ecx, ecx, 0x364
push 0x401ad8
lea eax, [ecx + eax + 0x10]
push eax
lea eax, [ebp - 0x840]
push 0x401ae8
push eax
call edi
add esp, 0x10
lea esi, [ebp - 0x840]
jmp 0x40490e
mov eax, dword [0x41226c]
cmp eax, ebx
je case.default.0x4047f5
push 0x401ad8
mov ecx, dword [ebp + 0x74]
imul ecx, ecx, 0xac0
jmp 0x404a4a
mov eax, dword [0x412288]
cmp eax, ebx
je case.default.0x4047f5
mov ecx, dword [ebp + 0x74]
imul ecx, ecx, 0x4b8
push 0x401ad8
add ecx, eax
push ecx
jmp 0x404a4f
mov eax, dword [0x41227c]
cmp eax, ebx
je case.default.0x4047f5
mov ecx, dword [ebp + 0x74]
imul ecx, ecx, 0x368
jmp 0x404a45
mov eax, dword [0x412268]
cmp eax, ebx
je case.default.0x4047f5
mov ecx, dword [ebp + 0x74]
imul ecx, ecx, 0x4cc
jmp 0x404a45
mov eax, dword [0x412264]
jmp 0x404aad
mov eax, dword [0x412280]
cmp eax, ebx
je case.default.0x4047f5
mov ecx, dword [ebp + 0x74]
imul ecx, ecx, 0x3560
jmp 0x404a45
mov eax, dword [0x41226c]
cmp eax, ebx
je case.default.0x4047f5
push 0x401ac4
jmp 0x404a7d
mov eax, dword [0x412268]
cmp eax, ebx
je case.default.0x4047f5
mov ecx, dword [ebp + 0x74]
imul ecx, ecx, 0x4cc
push 0x401ac4
lea eax, [ecx + eax + 0x10]
push eax
lea eax, [ebp - 0x840]
push 0x401ae8
push eax
call edi
add esp, 0x10
lea esi, [ebp - 0x840]
lea ebx, [ebp - 0x40]
test esi, esi
je case.default.0x4047f5
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
pop edi
pop esi
pop ebx
add ebp, 0x68
leave
ret