Function at 0x40f1ca
Capabilities:
Query environment variable

Disassembly:
push 0x24
mov eax, 0x4d604c
call fcn.004b6730
and dword [ebp - 4], 0
lea ebx, [ebp + 0xc]
mov byte [ebp - 0xd], 1
call fcn.0040c913
mov eax, dword [ebp + 0xc]
cmp dword [eax - 0xc], 0xb
jge 0x40f1fe
lea ecx, [eax - 0x10]
call fcn.00402845
mov al, 1
jmp 0x40f4f1
push 9
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp + 0xc]
call fcn.00407990
lea edi, [ebp - 0x14]
mov byte [ebp - 4], 1
call fcn.00411ec6
mov ebx, edi
call fcn.0040c913
push str.rundll32
xor ecx, ecx
mov esi, edi
call fcn.00407898
cmp eax, 0xffffffff
jne 0x40f245
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
call fcn.00402845
mov ecx, dword [ebp + 0xc]
add ecx, 0xfffffff0
jmp 0x40f1f2
xor ebx, ebx
inc ebx
cmp eax, ebx
mov eax, dword [ebp - 0x14]
jne 0x40f282
cmp dword [eax - 0xc], 0
jge 0x40f25f
push 0x80070057
call fcn.00402977
movzx ecx, word [eax]
cmp cx, 0x22
je 0x40f282
lea ecx, [eax - 0x10]
call fcn.00402845
mov ecx, dword [ebp + 0xc]
add ecx, 0xfffffff0
call fcn.00402845
mov al, bl
jmp 0x40f4f1
lea ecx, [eax - 0x10]
mov byte [ebp - 4], 0
call fcn.00402845
mov eax, dword [ebp + 0xc]
mov eax, dword [eax - 0xc]
mov ecx, eax
shl ecx, 3
mov ebx, 0x800
cmp ecx, ebx
jl 0x40f2a7
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.00490db6
lea edi, [ebx + ebx]
push edi
mov esi, eax
push 0
push esi
call fcn.004b62d0
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.0040272d
push esi
call fcn.00490dab
pop ecx
lea eax, [ebp + 0xc]
push eax
lea ecx, [ebp - 0x18]
call fcn.004022fa
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 2
call fcn.0049ce85
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.0040272d
xor edi, edi
jmp 0x40f341
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x28]
lea ecx, [ebp - 0x30]
call fcn.0049d2c3
push dword [ebp - 0x18]
call esi
push eax
lea ecx, [ebp - 0x18]
call fcn.0040272d
mov eax, dword [ebp - 0x18]
cmp dword [eax - 0xc], edi
jne 0x40f324
cmp dword [ebp - 0x28], edi
mov dword [ebp - 0x1c], edi
jle 0x40f4cc
push dword [ebp - 0x1c]
lea ecx, [ebp - 0x30]
call fcn.0040cb47
push eax
lea ecx, [ebp - 0x14]
call fcn.004022fa
lea edi, [ebp - 0x14]
mov byte [ebp - 4], 4
call fcn.00411ec6
mov ebx, edi
call fcn.0040c913
call fcn.0040c8c6
push str.rundll32
xor ecx, ecx
mov esi, edi
call fcn.00407898
cmp eax, 0xffffffff
je 0x40f3ae
push dword [ebp - 0x14]
call dword [sym.imp.SHLWAPI.dll_PathGetArgsW]
push eax
mov ecx, edi
call fcn.0040272d
mov eax, dword [ebp - 0x14]
cmp dword [eax - 0xc], 0
je 0x40f3d2
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.0040f99a
test al, al
je 0x40f3f5
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
call fcn.00402845
inc dword [ebp - 0x1c]
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x28]
jl 0x40f355
jmp 0x40f4cc
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
mov byte [ebp - 0xd], 0
call fcn.00402845
push 0
push 0x2c
lea ecx, [ebp + 0xc]
call fcn.00411e72
mov edi, eax
test edi, edi
jl 0x40f4cc
lea ebx, [edi + 1]
push ebx
push 0x2c
lea ecx, [ebp + 0xc]
call fcn.00411e72
push ebx
push 0x20
lea ecx, [ebp + 0xc]
mov esi, eax
call fcn.00411e72
mov ebx, eax
cmp ebx, edi
jge 0x40f45d
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 2
call fcn.0049d161
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.00402845
xor bl, bl
jmp 0x40f270
cmp esi, edi
jge 0x40f472
push ebx
push 0x2d
lea ecx, [ebp + 0xc]
call fcn.00411e72
mov esi, eax
cmp esi, edi
jl 0x40f43f
sub esi, ebx
push esi
push ebx
lea eax, [ebp + 0x28]
push eax
lea ecx, [ebp + 0xc]
call fcn.00407912
lea ebx, [ebp + 0x28]
mov byte [ebp - 4], 5
call fcn.0040c913
call fcn.0040c8c6
mov esi, dword [ebp + 0x28]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
lea ecx, [esi - 0x10]
test eax, eax
je 0x40f4c7
call fcn.00402845
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 2
call fcn.0049d161
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.00402845
mov bl, 1
jmp 0x40f270
call fcn.00402845
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 2
call fcn.0049d161
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.00402845
mov ecx, dword [ebp + 0xc]
add ecx, 0xfffffff0
call fcn.00402845
mov al, byte [ebp - 0xd]
call fcn.004b6808
ret 0x24