Function at 0x40ee17
Capabilities:
Query environment variable

Disassembly:
push 0x24
mov eax, 0x4cda3f
call fcn.004ae920
and dword [ebp - 4], 0
lea ebx, [ebp + 0xc]
mov byte [ebp - 0xd], 1
call fcn.0040c56d
mov eax, dword [ebp + 0xc]
cmp dword [eax - 0xc], 0xb
jge 0x40ee4b
lea ecx, [eax - 0x10]
call fcn.00402883
mov al, 1
jmp 0x40f13e
push 9
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp + 0xc]
call fcn.004078c2
lea edi, [ebp - 0x14]
mov byte [ebp - 4], 1
call fcn.00411b13
mov ebx, edi
call fcn.0040c56d
push str.rundll32
xor ecx, ecx
mov esi, edi
call fcn.004077ca
cmp eax, 0xffffffff
jne 0x40ee92
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
call fcn.00402883
mov ecx, dword [ebp + 0xc]
add ecx, 0xfffffff0
jmp 0x40ee3f
xor ebx, ebx
inc ebx
cmp eax, ebx
mov eax, dword [ebp - 0x14]
jne 0x40eecf
cmp dword [eax - 0xc], 0
jge 0x40eeac
push 0x80070057
call fcn.004029b5
movzx ecx, word [eax]
cmp cx, 0x22
je 0x40eecf
lea ecx, [eax - 0x10]
call fcn.00402883
mov ecx, dword [ebp + 0xc]
add ecx, 0xfffffff0
call fcn.00402883
mov al, bl
jmp 0x40f13e
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 0x40eef4
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.00489d74
lea edi, [ebx + ebx]
push edi
mov esi, eax
push 0
push esi
call fcn.004ae4c0
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.0040274c
push esi
call fcn.00489d7f
pop ecx
lea eax, [ebp + 0xc]
push eax
lea ecx, [ebp - 0x18]
call fcn.00402582
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 2
call fcn.00495dfe
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.0040274c
xor edi, edi
jmp 0x40ef8e
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x28]
lea ecx, [ebp - 0x30]
call fcn.0049618c
push dword [ebp - 0x18]
call esi
push eax
lea ecx, [ebp - 0x18]
call fcn.0040274c
mov eax, dword [ebp - 0x18]
cmp dword [eax - 0xc], edi
jne 0x40ef71
cmp dword [ebp - 0x28], edi
mov dword [ebp - 0x1c], edi
jle 0x40f119
push dword [ebp - 0x1c]
lea ecx, [ebp - 0x30]
call fcn.0040c7a1
push eax
lea ecx, [ebp - 0x14]
call fcn.00402582
lea edi, [ebp - 0x14]
mov byte [ebp - 4], 4
call fcn.00411b13
mov ebx, edi
call fcn.0040c56d
call fcn.0040c520
push str.rundll32
xor ecx, ecx
mov esi, edi
call fcn.004077ca
cmp eax, 0xffffffff
je 0x40effb
push dword [ebp - 0x14]
call dword [sym.imp.SHLWAPI.dll_PathGetArgsW]
push eax
mov ecx, edi
call fcn.0040274c
mov eax, dword [ebp - 0x14]
cmp dword [eax - 0xc], 0
je 0x40f01f
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.0040f5e7
test al, al
je 0x40f042
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 0x40efa2
jmp 0x40f119
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.00411abf
mov edi, eax
test edi, edi
jl 0x40f119
lea ebx, [edi + 1]
push ebx
push 0x2c
lea ecx, [ebp + 0xc]
call fcn.00411abf
push ebx
push 0x20
lea ecx, [ebp + 0xc]
mov esi, eax
call fcn.00411abf
mov ebx, eax
cmp ebx, edi
jge 0x40f0aa
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 2
call fcn.0049602a
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.00402883
xor bl, bl
jmp 0x40eebd
cmp esi, edi
jge 0x40f0bf
push ebx
push 0x2d
lea ecx, [ebp + 0xc]
call fcn.00411abf
mov esi, eax
cmp esi, edi
jl 0x40f08c
sub esi, ebx
push esi
push ebx
lea eax, [ebp + 0x28]
push eax
lea ecx, [ebp + 0xc]
call fcn.00407844
lea ebx, [ebp + 0x28]
mov byte [ebp - 4], 5
call fcn.0040c56d
call fcn.0040c520
mov esi, dword [ebp + 0x28]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
lea ecx, [esi - 0x10]
test eax, eax
je 0x40f114
call fcn.00402883
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 2
call fcn.0049602a
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.00402883
mov bl, 1
jmp 0x40eebd
call fcn.00402883
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 2
call fcn.0049602a
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.004ae9f8
ret 0x24