Function at 0x412f7c
Capabilities:
Query environment variable

Disassembly:
push 0x24
mov eax, 0x4d7e56
call fcn.004becb0
and dword [ebp - 4], 0
lea ebx, [ebp + 0xc]
mov byte [ebp - 0xd], 1
call fcn.0040f613
mov eax, dword [ebp + 0xc]
cmp dword [eax - 0xc], 0xb
jge 0x412fb0
lea ecx, [eax - 0x10]
call fcn.004027b0
mov al, 1
jmp 0x4132a3
push 9
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp + 0xc]
call fcn.0040739d
lea edi, [ebp - 0x14]
mov byte [ebp - 4], 1
call fcn.00415c5a
mov ebx, edi
call fcn.0040f613
push str.rundll32
xor ecx, ecx
mov esi, edi
call fcn.004072a5
cmp eax, 0xffffffff
jne 0x412ff7
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
call fcn.004027b0
mov ecx, dword [ebp + 0xc]
add ecx, 0xfffffff0
jmp 0x412fa4
xor ebx, ebx
inc ebx
cmp eax, ebx
mov eax, dword [ebp - 0x14]
jne 0x413034
cmp dword [eax - 0xc], 0
jge 0x413011
push 0x80070057
call fcn.004028d7
movzx ecx, word [eax]
cmp cx, 0x22
je 0x413034
lea ecx, [eax - 0x10]
call fcn.004027b0
mov ecx, dword [ebp + 0xc]
add ecx, 0xfffffff0
call fcn.004027b0
mov al, bl
jmp 0x4132a3
lea ecx, [eax - 0x10]
mov byte [ebp - 4], 0
call fcn.004027b0
mov eax, dword [ebp + 0xc]
mov eax, dword [eax - 0xc]
mov ecx, eax
shl ecx, 3
mov ebx, 0x800
cmp ecx, ebx
jl 0x413059
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.004985df
lea edi, [ebx + ebx]
push edi
mov esi, eax
push 0
push esi
call fcn.004be850
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.004026bd
push esi
call fcn.004985ea
pop ecx
lea eax, [ebp + 0xc]
push eax
lea ecx, [ebp - 0x18]
call fcn.0040228a
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 2
call fcn.004a451b
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.004026bd
xor edi, edi
jmp 0x4130f3
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x28]
lea ecx, [ebp - 0x30]
call fcn.004a4959
push dword [ebp - 0x18]
call esi
push eax
lea ecx, [ebp - 0x18]
call fcn.004026bd
mov eax, dword [ebp - 0x18]
cmp dword [eax - 0xc], edi
jne 0x4130d6
cmp dword [ebp - 0x28], edi
mov dword [ebp - 0x1c], edi
jle 0x41327e
push dword [ebp - 0x1c]
lea ecx, [ebp - 0x30]
call fcn.0041090f
push eax
lea ecx, [ebp - 0x14]
call fcn.0040228a
lea edi, [ebp - 0x14]
mov byte [ebp - 4], 4
call fcn.00415c5a
mov ebx, edi
call fcn.0040f613
call fcn.0040f5c6
push str.rundll32
xor ecx, ecx
mov esi, edi
call fcn.004072a5
cmp eax, 0xffffffff
je 0x413160
push dword [ebp - 0x14]
call dword [sym.imp.SHLWAPI.dll_PathGetArgsW]
push eax
mov ecx, edi
call fcn.004026bd
mov eax, dword [ebp - 0x14]
cmp dword [eax - 0xc], 0
je 0x413184
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.0041374c
test al, al
je 0x4131a7
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
call fcn.004027b0
inc dword [ebp - 0x1c]
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x28]
jl 0x413107
jmp 0x41327e
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
mov byte [ebp - 0xd], 0
call fcn.004027b0
push 0
push 0x2c
lea ecx, [ebp + 0xc]
call fcn.00415c06
mov edi, eax
test edi, edi
jl 0x41327e
lea ebx, [edi + 1]
push ebx
push 0x2c
lea ecx, [ebp + 0xc]
call fcn.00415c06
push ebx
push 0x20
lea ecx, [ebp + 0xc]
mov esi, eax
call fcn.00415c06
mov ebx, eax
cmp ebx, edi
jge 0x41320f
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 2
call fcn.004a47f7
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.004027b0
xor bl, bl
jmp 0x413022
cmp esi, edi
jge 0x413224
push ebx
push 0x2d
lea ecx, [ebp + 0xc]
call fcn.00415c06
mov esi, eax
cmp esi, edi
jl 0x4131f1
sub esi, ebx
push esi
push ebx
lea eax, [ebp + 0x28]
push eax
lea ecx, [ebp + 0xc]
call fcn.0040731f
lea ebx, [ebp + 0x28]
mov byte [ebp - 4], 5
call fcn.0040f613
call fcn.0040f5c6
mov esi, dword [ebp + 0x28]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
lea ecx, [esi - 0x10]
test eax, eax
je 0x413279
call fcn.004027b0
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 2
call fcn.004a47f7
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.004027b0
mov bl, 1
jmp 0x413022
call fcn.004027b0
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 2
call fcn.004a47f7
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.004027b0
mov ecx, dword [ebp + 0xc]
add ecx, 0xfffffff0
call fcn.004027b0
mov al, byte [ebp - 0xd]
call fcn.004bed88
ret 0x24