Function at 0x40585d
Capabilities:
Set environment variable

Disassembly:
push ebp
lea ebp, [esp - 0x68]
sub esp, 0x8a8
push ebx
push esi
mov esi, dword [0x41524c]
xor ebx, ebx
cmp esi, ebx
je 0x405c3b
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 0x4058d4
cmp dword [ebp + 0x78], ebx
jne 0x4058d4
movzx eax, byte [ebp + 0x7c]
push eax
lea eax, [ebp - 0x40]
push 0x401848
push eax
call edi
mov esi, dword [0x41524c]
add esp, 0xc
movzx eax, byte [ebp + 0x70]
cmp eax, 0x12
ja case.default.0x4058e1
jmp dword [eax*4 + 0x405c45]
cmp esi, ebx
je case.default.0x4058e1
add esi, 0x10
cmp dword [ebp + 0x78], ebx
jne 0x405c2e
mov ebx, dword [0x41524c]
add ebx, 0xb0
jmp 0x405c2e
mov eax, dword [0x415250]
cmp eax, ebx
je case.default.0x4058e1
mov ecx, dword [ebp + 0x74]
imul ecx, ecx, 0x368
add eax, ecx
cmp dword [ebp + 0x78], ebx
lea esi, [eax + 0x10]
jne 0x405c2e
lea ebx, [eax + 0xb0]
jmp 0x405c2e
mov eax, dword [0x415254]
cmp eax, ebx
je case.default.0x4058e1
mov ecx, dword [ebp + 0x74]
imul ecx, ecx, 0x4cc
jmp 0x405923
mov eax, dword [0x41525c]
cmp eax, ebx
je case.default.0x4058e1
mov ecx, dword [ebp + 0x74]
imul ecx, ecx, 0x8b4
jmp 0x405923
mov eax, dword [0x415260]
cmp eax, ebx
je case.default.0x4058e1
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 0x4059a0
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 [0x415260]
push 0x401cec
lea eax, [esi + eax + 0x10]
push eax
lea eax, [ebp - 0x840]
push 0x401ce0
push eax
call edi
xor ebx, ebx
add esp, 0x10
cmp dword [ebp + 0x78], ebx
lea esi, [ebp - 0x840]
jne 0x405c32
mov eax, dword [0x415260]
mov ecx, dword [ebp + 0x64]
movzx eax, byte [ecx + eax + 0x35c]
push eax
lea eax, [ebp - 0x40]
push 0x401848
push eax
call edi
add esp, 0xc
lea ebx, [ebp - 0x40]
jmp 0x405c32
mov eax, dword [0x415268]
cmp eax, ebx
je case.default.0x4058e1
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 0x405a36
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 [0x415268]
push 0x401cec
lea eax, [esi + eax + 0x10]
push eax
lea eax, [ebp - 0x840]
push 0x401ce0
push eax
call edi
xor ebx, ebx
add esp, 0x10
cmp dword [ebp + 0x78], ebx
lea esi, [ebp - 0x840]
jne 0x405c32
mov eax, dword [0x415268]
mov ecx, dword [ebp + 0x64]
jmp 0x4059e3
mov eax, dword [0x415264]
cmp eax, ebx
je case.default.0x4058e1
mov ecx, dword [ebp + 0x74]
imul ecx, ecx, 0x154
jmp 0x405923
mov eax, dword [0x41526c]
cmp eax, ebx
je case.default.0x4058e1
mov ecx, dword [ebp + 0x74]
imul ecx, ecx, 0x3560
jmp 0x405923
mov eax, dword [0x415270]
cmp eax, ebx
je case.default.0x4058e1
mov ecx, dword [ebp + 0x74]
imul ecx, ecx, 0x2b0
cmp dword [ebp + 0x78], ebx
lea esi, [ecx + eax]
jne 0x405c2e
push dword [esi + 0xa0]
lea eax, [ebp - 0x40]
push 0x401848
push eax
call edi
add esp, 0xc
jmp 0x405c2b
mov eax, dword [0x415280]
cmp eax, ebx
je case.default.0x4058e1
mov ecx, dword [ebp + 0x74]
imul ecx, ecx, 0xb8
add eax, ecx
cmp dword [ebp + 0x78], ebx
lea esi, [eax + 0x10]
jne 0x405c2e
push dword [eax + 0xb0]
jmp 0x405adc
mov eax, dword [0x415260]
cmp eax, ebx
je case.default.0x4058e1
mov ecx, dword [ebp + 0x74]
imul ecx, ecx, 0x364
push 0x401cd0
lea eax, [ecx + eax + 0x10]
push eax
lea eax, [ebp - 0x840]
push 0x401ce0
push eax
call edi
add esp, 0x10
lea esi, [ebp - 0x840]
jmp 0x4059fa
mov eax, dword [0x415258]
cmp eax, ebx
je case.default.0x4058e1
push 0x401cd0
mov ecx, dword [ebp + 0x74]
imul ecx, ecx, 0xac0
jmp 0x405b36
mov eax, dword [0x415274]
cmp eax, ebx
je case.default.0x4058e1
mov ecx, dword [ebp + 0x74]
imul ecx, ecx, 0x4b8
push 0x401cd0
add ecx, eax
push ecx
jmp 0x405b3b
mov eax, dword [0x415268]
cmp eax, ebx
je case.default.0x4058e1
mov ecx, dword [ebp + 0x74]
imul ecx, ecx, 0x368
jmp 0x405b31
mov eax, dword [0x415254]
cmp eax, ebx
je case.default.0x4058e1
mov ecx, dword [ebp + 0x74]
imul ecx, ecx, 0x4cc
jmp 0x405b31
mov eax, dword [0x415250]
jmp 0x405b99
mov eax, dword [0x41526c]
cmp eax, ebx
je case.default.0x4058e1
mov ecx, dword [ebp + 0x74]
imul ecx, ecx, 0x3560
jmp 0x405b31
mov eax, dword [0x415258]
cmp eax, ebx
je case.default.0x4058e1
push 0x401cbc
jmp 0x405b69
mov eax, dword [0x415254]
cmp eax, ebx
je case.default.0x4058e1
mov ecx, dword [ebp + 0x74]
imul ecx, ecx, 0x4cc
push 0x401cbc
lea eax, [ecx + eax + 0x10]
push eax
lea eax, [ebp - 0x840]
push 0x401ce0
push eax
call edi
add esp, 0x10
lea esi, [ebp - 0x840]
lea ebx, [ebp - 0x40]
test esi, esi
je case.default.0x4058e1
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
pop edi
pop esi
pop ebx
add ebp, 0x68
leave
ret