Function at 0x1004f61
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc5c
mov eax, dword [0x1009020]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0xc54], eax
lea eax, [ebp - 0xc38]
push eax
push 0x1002150
push 0x1002170
call fcn.010068b1
test eax, eax
jl 0x1005300
mov eax, dword [ebp - 0xc38]
mov ecx, dword [eax]
lea edx, [ebp - 0xc4c]
push edx
push 0x100175c
push eax
call dword [ecx]
mov eax, dword [0x1009270]
mov eax, dword [eax]
and dword [ebp - 0xc40], 0
test eax, eax
mov dword [ebp - 0xc50], eax
jle 0x10052e8
and dword [ebp - 0xc44], 0
push ebx
push esi
push edi
mov edi, 0x104
push dword [ebp - 0xc40]
push dword [0x1009270]
call dword [sym.imp.COMCTL32.dll_DSA_GetItemPtr]
mov esi, eax
mov eax, dword [ebp - 0xc44]
cdq
idiv dword [ebp - 0xc50]
add eax, dword [ebp + 0x10]
push eax
call fcn.01006771
push edi
lea eax, [ebp - 0x20c]
push eax
push dword [esi + 4]
call dword [sym.imp.COMCTL32.dll_Ordinal_235]
lea eax, [ebp - 0x20c]
push eax
call sub.SHELL32.dll_Ordinal_33
lea eax, [ebp - 0x20c]
push eax
call sub.SHELL32.dll_Ordinal_52
mov ebx, eax
xor eax, eax
cmp word [ebx], ax
je 0x100503d
mov word [ebx - 2], ax
cmp dword [ebp + 0xc], eax
je 0x1005082
lea eax, [ebp - 0x20c]
push eax
call sub.SHELL32.dll_Ordinal_34
push eax
push 0x10013c8
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x10052c4
lea eax, [ebp - 0x20c]
push eax
call sub.SHELL32.dll_Ordinal_34
push eax
push 0x10013e0
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x10052c4
mov eax, dword [ebp - 0xc38]
mov ecx, dword [eax]
push ebx
push eax
call dword [ecx + 0x2c]
xor ebx, ebx
cmp word [ebp - 0x20c], 0x22
jne 0x10050c8
cmp word [ebp - 0x20a], bx
lea eax, [ebp - 0x20a]
je 0x10050be
mov cx, word [eax]
cmp cx, 0x22
je 0x10050c4
mov word [eax - 2], cx
inc eax
inc eax
cmp word [eax], bx
jne 0x10050aa
cmp word [eax], 0x22
jne 0x10050c8
mov word [eax - 2], bx
mov eax, dword [esi + 8]
cmp eax, ebx
je 0x10050e3
cmp word [eax], bx
je 0x10050e3
mov ecx, dword [ebp - 0xc38]
mov edx, dword [ecx]
push eax
push ecx
call dword [edx + 0x24]
jmp 0x1005118
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHELL32.dll_Ordinal_31]
push 0x10016a4
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
mov eax, dword [ebp - 0xc38]
mov ecx, dword [eax]
jne 0x100510f
push 0x1001974
jmp 0x1005114
push 0x10014fc
push eax
call dword [ecx + 0x24]
cmp word [esi + 0x10], bx
jne 0x1005136
lea eax, [ebp - 0x20c]
push eax
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x1005136
push ebx
push ebx
jmp 0x100514f
push dword [esi + 0xc]
call sub.SHELL32.dll_Ordinal_52
cmp word [eax], bx
je 0x1005147
mov word [eax - 2], bx
movzx edx, word [esi + 0x10]
push edx
push dword [esi + 0xc]
mov eax, dword [ebp - 0xc38]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x44]
mov eax, dword [ebp - 0xc38]
mov ecx, dword [eax]
xor edx, edx
mov dx, word [esi + 0x12]
push edx
push eax
call dword [ecx + 0x34]
mov eax, dword [ebp - 0xc38]
push dword [esi + 0x14]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x3c]
mov eax, dword [ebp - 0xc38]
push dword [esi]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x1c]
mov eax, dword [esi + 8]
mov dword [ebp - 0xc5c], eax
push edi
lea eax, [ebp - 0xa2c]
push eax
lea eax, [ebp - 0x20c]
mov dword [ebp - 0xc58], ebx
mov ebx, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push eax
call ebx
and word [ebp - 0x826], 0
push 3
lea eax, [ebp - 0xc5c]
push eax
lea eax, [ebp - 0xa2c]
push eax
call dword [sym.imp.SHELL32.dll_PathResolve]
test eax, eax
jne 0x10051ec
push edi
lea eax, [ebp - 0xa2c]
push eax
lea eax, [ebp - 0x20c]
push eax
call ebx
and word [ebp - 0x826], 0
mov eax, dword [ebp - 0xc38]
mov ecx, dword [eax]
lea edx, [ebp - 0x20c]
push edx
push eax
call dword [ecx + 0x50]
mov eax, dword [ebp - 0xc38]
mov ecx, dword [eax]
lea edx, [ebp - 0xc48]
push edx
push 0x1002140
push eax
call dword [ecx]
test eax, eax
jl 0x1005265
mov eax, dword [ebp - 0xc48]
mov ecx, dword [eax]
lea edx, [ebp - 0xc3c]
push edx
push eax
call dword [ecx + 0x18]
test eax, eax
jl 0x1005259
cmp dword [esi + 0x18], 0
je 0x1005240
or byte [ebp - 0xc3b], 4
jmp 0x1005247
and byte [ebp - 0xc3b], 0xfb
mov eax, dword [ebp - 0xc48]
push dword [ebp - 0xc3c]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x1c]
mov eax, dword [ebp - 0xc48]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
push dword [esi]
lea eax, [ebp - 0x414]
push dword [ebp - 0xc54]
push eax
call sub.SHELL32.dll_Ordinal_37
push 0x1001528
push edi
lea eax, [ebp - 0x414]
push eax
call fcn.010025d8
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.SHELL32.dll_PathQualify]
push 0xffffffffffffffff
lea eax, [ebp - 0x414]
push eax
push edi
lea eax, [ebp - 0xc34]
push eax
call dword [sym.imp.SHELL32.dll_Ordinal_79]
mov eax, dword [ebp - 0xc4c]
mov ecx, dword [eax]
push 1
lea edx, [ebp - 0xc34]
push edx
push eax
call dword [ecx + 0x18]
mov eax, dword [ebp + 0x10]
inc dword [ebp - 0xc40]
add dword [ebp - 0xc44], eax
mov eax, dword [ebp - 0xc40]
cmp eax, dword [ebp - 0xc50]
jl 0x1004fdd
pop edi
pop esi
pop ebx
mov eax, dword [ebp - 0xc4c]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0xc38]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov ecx, dword [ebp - 4]
call fcn.0100815d
leave
ret 0xc