Function at 0x40ede2
Capabilities:
Query environment variable

Disassembly:
push 0x24
mov eax, 0x4cd5ec
call fcn.004ae200
and dword [ebp - 4], 0
lea ebx, [ebp + 0xc]
mov byte [ebp - 0xd], 1
call fcn.0040c554
mov eax, dword [ebp + 0xc]
cmp dword [eax - 0xc], 0xb
jge 0x40ee16
lea ecx, [eax - 0x10]
call fcn.00402883
mov al, 1
jmp 0x40f109
push 9
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp + 0xc]
call fcn.004078a9
lea edi, [ebp - 0x14]
mov byte [ebp - 4], 1
call fcn.00411ade
mov ebx, edi
call fcn.0040c554
push str.rundll32
xor ecx, ecx
mov esi, edi
call fcn.004077b1
cmp eax, 0xffffffff
jne 0x40ee5d
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
call fcn.00402883
mov ecx, dword [ebp + 0xc]
add ecx, 0xfffffff0
jmp 0x40ee0a
xor ebx, ebx
inc ebx
cmp eax, ebx
mov eax, dword [ebp - 0x14]
jne 0x40ee9a
cmp dword [eax - 0xc], 0
jge 0x40ee77
push 0x80070057
call fcn.004029b5
movzx ecx, word [eax]
cmp cx, 0x22
je 0x40ee9a
lea ecx, [eax - 0x10]
call fcn.00402883
mov ecx, dword [ebp + 0xc]
add ecx, 0xfffffff0
call fcn.00402883
mov al, bl
jmp 0x40f109
lea ecx, [eax - 0x10]
mov byte [ebp - 4], 0
call fcn.00402883
mov eax, dword [ebp + 0xc]
mov eax, dword [eax - 0xc]
mov ecx, eax
shl ecx, 3
mov ebx, 0x800
cmp ecx, ebx
jl 0x40eebf
mov ebx, eax
shl ebx, 3
xor ecx, ecx
push 2
pop edx
mov eax, ebx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0048964c
lea edi, [ebx + ebx]
push edi
mov esi, eax
push 0
push esi
call fcn.004adda0
add esp, 0x10
push ebx
push esi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
xor eax, eax
push esi
lea ecx, [ebp + 0xc]
mov word [edi + esi - 2], ax
call fcn.0040276b
push esi
call fcn.00489657
pop ecx
lea eax, [ebp + 0xc]
push eax
lea ecx, [ebp - 0x18]
call fcn.004025a1
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 2
call fcn.004956f5
mov byte [ebp - 4], 3
push dword [ebp - 0x18]
mov esi, dword [sym.imp.SHLWAPI.dll_PathGetArgsW]
call esi
push eax
lea ecx, [ebp - 0x18]
call fcn.0040276b
xor edi, edi
jmp 0x40ef59
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x28]
lea ecx, [ebp - 0x30]
call fcn.00495a83
push dword [ebp - 0x18]
call esi
push eax
lea ecx, [ebp - 0x18]
call fcn.0040276b
mov eax, dword [ebp - 0x18]
cmp dword [eax - 0xc], edi
jne 0x40ef3c
cmp dword [ebp - 0x28], edi
mov dword [ebp - 0x1c], edi
jle 0x40f0e4
push dword [ebp - 0x1c]
lea ecx, [ebp - 0x30]
call fcn.00434b30
push eax
lea ecx, [ebp - 0x14]
call fcn.004025a1
lea edi, [ebp - 0x14]
mov byte [ebp - 4], 4
call fcn.00411ade
mov ebx, edi
call fcn.0040c554
call fcn.0040c507
push str.rundll32
xor ecx, ecx
mov esi, edi
call fcn.004077b1
cmp eax, 0xffffffff
je 0x40efc6
push dword [ebp - 0x14]
call dword [sym.imp.SHLWAPI.dll_PathGetArgsW]
push eax
mov ecx, edi
call fcn.0040276b
mov eax, dword [ebp - 0x14]
cmp dword [eax - 0xc], 0
je 0x40efea
push dword [ebp + 0x28]
mov ecx, dword [ebp + 8]
push dword [ebp + 0x24]
lea edx, [ebp - 0x14]
push dword [ebp + 0x20]
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
call fcn.0040f5b2
test al, al
je 0x40f00d
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
call fcn.00402883
inc dword [ebp - 0x1c]
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x28]
jl 0x40ef6d
jmp 0x40f0e4
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
mov byte [ebp - 0xd], 0
call fcn.00402883
push 0
push 0x2c
lea ecx, [ebp + 0xc]
call fcn.00411a8a
mov edi, eax
test edi, edi
jl 0x40f0e4
lea ebx, [edi + 1]
push ebx
push 0x2c
lea ecx, [ebp + 0xc]
call fcn.00411a8a
push ebx
push 0x20
lea ecx, [ebp + 0xc]
mov esi, eax
call fcn.00411a8a
mov ebx, eax
cmp ebx, edi
jge 0x40f075
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 2
call fcn.00495921
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.00402883
xor bl, bl
jmp 0x40ee88
cmp esi, edi
jge 0x40f08a
push ebx
push 0x2d
lea ecx, [ebp + 0xc]
call fcn.00411a8a
mov esi, eax
cmp esi, edi
jl 0x40f057
sub esi, ebx
push esi
push ebx
lea eax, [ebp + 0x28]
push eax
lea ecx, [ebp + 0xc]
call fcn.0040782b
lea ebx, [ebp + 0x28]
mov byte [ebp - 4], 5
call fcn.0040c554
call fcn.0040c507
mov esi, dword [ebp + 0x28]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
lea ecx, [esi - 0x10]
test eax, eax
je 0x40f0df
call fcn.00402883
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 2
call fcn.00495921
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.00402883
mov bl, 1
jmp 0x40ee88
call fcn.00402883
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 2
call fcn.00495921
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.00402883
mov ecx, dword [ebp + 0xc]
add ecx, 0xfffffff0
call fcn.00402883
mov al, byte [ebp - 0xd]
call fcn.004ae2d8
ret 0x24