Function at 0x4ad02193
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov ax, word [esi]
inc esi
inc esi
test ax, ax
jne 0x4ad02094
cmp word [esi], bx
je 0x4ad025de
push esi
call dword [sym.imp.msvcrt.dll_wcslen]
add eax, dword [ebp - 0x20]
pop ecx
cmp eax, 0x104
ja 0x4ad02094
push 1
push esi
push dword [ebp - 4]
push dword [ebp + 0xc]
call fcn.4ad02061
test eax, eax
jne 0x4ad020da
mov eax, dword [0x4ad28a04]
cmp eax, 2
je 0x4ad02094
jmp 0x4ad0e01f
mov edi, dword [sym.imp.msvcrt.dll__wcsicmp]
push str..BAT
push esi
call edi
test eax, eax
pop ecx
pop ecx
je 0x4ad051e9
push str..CMD
push esi
call edi
test eax, eax
pop ecx
pop ecx
je 0x4ad051e9
xor eax, eax
jmp 0x4ad026e5
push ebp
mov ebp, esp
sub esp, 0x22c
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
push dword [eax + 0x38]
xor ebx, ebx
mov dword [ebp - 4], ebx
call fcn.4ad0171e
mov esi, eax
cmp esi, ebx
je 0x4ad021bf
push esi
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
mov ebx, eax
mov edi, 0x104
cmp ebx, edi
jae 0x4ad11062
cmp byte [0x4ad2ca64], 0
je 0x4ad021f6
test esi, esi
je 0x4ad11071
push 4
push 0x4ad0b9f8
push esi
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x4ad11071
push edi
push 0
lea eax, [ebp - 0x22c]
push eax
call fcn.4ad01bc6
test esi, esi
je 0x4ad02219
lea eax, [ebp - 0x22c]
push esi
push eax
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
xor eax, eax
mov ax, word [0x4ad30b7c]
push eax
lea eax, [ebp - 0x22c]
push eax
call fcn.4ad026ed
mov ax, word [0x4ad30b84]
and word [ebp - 0x10], 0
mov word [ebp - 0x14], ax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x22c]
push eax
mov word [ebp - 0x12], 0x3a
call fcn.4ad01739
cmp eax, ebx
sbb eax, eax
neg eax
mov dword [ebp - 0xc], eax
mov word [ebp - 0x12], 0
jne 0x4ad0b10d
lea edi, [ebp - 0x22c]
cmp word [edi], 0
mov dword [ebp + 8], edi
je 0x4ad0e02c
mov esi, dword [sym.imp.msvcrt.dll_wcscmp]
push 0x4ad0b9f0
push edi
call esi
test eax, eax
pop ecx
pop ecx
je 0x4ad0e02c
push 0x4ad0b9e8
push edi
call esi
test eax, eax
pop ecx
pop ecx
je 0x4ad0e02c
push 0x410
call fcn.4ad01302
mov edi, eax
test edi, edi
je 0x4ad110a9
mov ebx, dword [ebp + 0xc]
test ebx, ebx
je 0x4ad022d0
lea eax, [ebp - 0x22c]
push eax
push ebx
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
mov eax, dword [ebp + 8]
mov esi, dword [sym.imp.msvcrt.dll_wcscat]
lea ecx, [ebp - 0x22c]
sub eax, ecx
sar eax, 1
and word [ebx + eax*2], 0
test ebx, ebx
je 0x4ad022f6
push 0x4ad0b9f0
push ebx
call esi
pop ecx
pop ecx
push 0x208
push ebx
push edi
call fcn.4ad01d5f
test eax, eax
jne 0x4ad110ba
push edi
call fcn.4ad01d2c
mov ax, word [eax]
cmp ax, word [0x4ad30b84]
je 0x4ad02326
push 0x4ad0b9f4
push edi
call esi
pop ecx
pop ecx
push dword [ebp + 8]
push edi
call esi
push edi
call dword [sym.imp.msvcrt.dll_wcslen]
add esp, 0xc
lea eax, [eax + eax + 2]
push eax
push edi
call fcn.4ad016cb
mov ebx, eax
test ebx, ebx
je 0x4ad110a9
xor eax, eax
mov ax, word [0x4ad30b84]
push eax
push ebx
call fcn.4ad01b0c
and word [eax], 0
inc eax
inc eax
cmp dword [ebp - 0xc], 0
mov dword [ebp - 8], eax
jne 0x4ad02376
push 0x4ad30c20
call fcn.4ad0133f
mov dword [ebp - 4], eax
mov esi, dword [sym.imp.msvcrt.dll_wcslen]
push ebx
call esi
mov edi, eax
xor eax, eax
cmp dword [ebp - 4], eax
pop ecx
je 0x4ad0238f
push dword [ebp - 4]
call esi
pop ecx
add eax, edi
lea eax, [eax + eax + 8]
push eax
call fcn.4ad01302
mov edi, eax
test edi, edi
je 0x4ad110a9
mov esi, 0x4ad0ba08
push esi
push edi
call dword [sym.imp.msvcrt.dll_wcscat]
push ebx
mov ebx, dword [sym.imp.msvcrt.dll_wcscat]
push edi
call ebx
push esi
push edi
call ebx
add esp, 0x18
cmp dword [ebp - 0xc], 0
mov esi, 0x4ad0ba04
jne 0x4ad023e2
push esi
push edi
call ebx
cmp dword [ebp - 4], 0
pop ecx
pop ecx
je 0x4ad023e2
push dword [ebp - 4]
push edi
call ebx
pop ecx
pop ecx
push edi
call fcn.4ad02717
push 1
push esi
push edi
call fcn.4ad01580
cmp dword [ebp - 8], 0
mov dword [ebp + 8], eax
je 0x4ad0dfe4
push dword [ebp - 8]
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
mov dword [ebp - 0x18], eax
cmp byte [0x4ad2ca64], 0
je 0x4ad0dfed
push str.PATHEXT
call fcn.4ad0133f
mov edi, eax
test edi, edi
je 0x4ad0dfed
push edi
call fcn.4ad02717
push 1
push esi
push edi
call fcn.4ad01580
mov dword [ebp - 0x1c], eax
mov edi, dword [ebp + 8]
test edi, edi
je 0x4ad0dff7
push edi
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
mov ebx, eax
test edi, edi
je 0x4ad0dffe
push edi
call fcn.4ad0171e
test eax, eax
je 0x4ad02475
push edi
call fcn.4ad0171e
push eax
push edi
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
push edi
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
mov esi, eax
push edi
call fcn.4ad01d2c
mov ax, word [eax]
xor edi, edi
cmp ax, word [0x4ad30b84]
je 0x4ad02496
inc edi
inc ebx
inc esi
mov ecx, dword [ebp + 8]
xor edx, edx
cmp word [ecx], dx
je 0x4ad0dfbe
mov eax, dword [ebp - 0x18]
lea esi, [esi + eax + 1]
cmp esi, 0x104
mov dword [ebp - 0x20], esi
ja 0x4ad110c6
cmp dword [ebp + 0xc], edx
je 0x4ad024d2
push dword [ebp + 8]
push dword [ebp + 0xc]
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
mov ecx, dword [ebp + 8]
xor edx, edx
cmp edi, edx
mov eax, ebx
je 0x4ad110da
cmp edi, edx
lea eax, [ecx + eax*2]
mov dword [ebp + 8], eax
je 0x4ad02500
cmp dword [ebp + 0xc], edx
je 0x4ad0e005
lea eax, [ebp - 0x14]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.msvcrt.dll_wcscat]
pop ecx
pop ecx
xor edx, edx
cmp dword [ebp + 0xc], edx
je 0x4ad0e005
cmp dword [ebp - 8], edx
je 0x4ad0251c
push dword [ebp - 8]
push dword [ebp + 0xc]
call dword [sym.imp.msvcrt.dll_wcscat]
pop ecx
pop ecx
mov esi, dword [ebp + 0xc]
push esi
call fcn.4ad0171e
test eax, eax
je 0x4ad02539
push esi
call fcn.4ad0171e
push eax
push esi
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
push esi
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
cmp word [eax + 2], 0x3a
jne 0x4ad0255f
movzx eax, word [eax]
push eax
call fcn.4ad01de8
test eax, eax
je 0x4ad0243e
push 0x2e
push dword [ebp - 8]
call fcn.4ad01b0c
xor ebx, ebx
cmp eax, ebx
je 0x4ad0259e
cmp word [eax + 2], bx
je 0x4ad0259e
push 1
push dword [ebp + 0xc]
call fcn.4ad02641
test eax, eax
jne 0x4ad026aa
cmp dword [ebp - 0xc], ebx
jne 0x4ad0e00d
mov eax, dword [0x4ad28a04]
cmp eax, 2
jne 0x4ad110e2
push 0x2a
push dword [ebp - 8]
call fcn.4ad012e4
test eax, eax
jne 0x4ad11115
push 0x3f
push dword [ebp - 8]
call fcn.4ad012e4
test eax, eax
jne 0x4ad11115
mov esi, dword [ebp - 0x1c]
push ebx
push 0x4ad0ba4c
push dword [ebp - 4]
push dword [ebp + 0xc]
call fcn.4ad02061
test eax, eax
jne 0x4ad0209e
mov eax, dword [0x4ad28a04]
cmp eax, ebx
je 0x4ad025f0
cmp eax, 2
jne 0x4ad0243e
push 1
push 0x4ad0ba48
push dword [ebp - 4]
push dword [ebp + 0xc]
call fcn.4ad02061
test eax, eax
je 0x4ad0243e
jmp 0x4ad110f1
push 0x2e
push dword [ebp + 0xc]
call fcn.4ad01b0c
mov edi, eax
cmp edi, ebx
je 0x4ad02590
mov esi, dword [sym.imp.msvcrt.dll__wcsicmp]
push str..CMD
push edi
call esi
test eax, eax
pop ecx
pop ecx
je 0x4ad051e9
push str..BAT
push edi
call esi
neg eax
pop ecx
sbb eax, eax
pop ecx
inc eax
inc eax
pop edi
pop esi
pop ebx
leave
ret 8
push 2
pop eax
jmp 0x4ad026e6
xor eax, eax
mov ax, word [0x4ad30b84]
push eax
lea eax, [ebp - 0x22c]
push eax
call fcn.4ad01b0c
mov edi, eax
test edi, edi
je 0x4ad11094
inc edi
inc edi
jmp 0x4ad0226e
cmp dword [ebp - 0xc], edx
je 0x4ad11115
mov eax, dword [0x4ad28a04]
cmp eax, edx
je 0x4ad11115
cmp eax, 2
je 0x4ad11115
xor eax, eax
jmp 0x4ad026e6
and dword [ebp - 0x18], 0
jmp 0x4ad0240b
mov edi, str..COM_.EXE_.BAT_.CMD_.VBS_.JS_.WS
jmp 0x4ad0242c
xor ebx, ebx
jmp 0x4ad02453
xor esi, esi
jmp 0x4ad0247f
mov dword [ebp - 4], edx
jmp 0x4ad02544
cmp dword [0x4ad28a04], 5
jne 0x4ad02590
jmp 0x4ad026aa
cmp eax, ebx
jne 0x4ad025e7
jmp 0x4ad02094
cmp byte [0x4ad2ca64], 0
je 0x4ad11115
jmp 0x4ad11124
mov dword [0x4ad28a04], 0x233f
jmp 0x4ad0dfdd
push str.COMSPEC
call fcn.4ad0133f
mov esi, eax
test esi, esi
jne 0x4ad021f6
mov dword [0x4ad28a04], 0x23d2
jmp 0x4ad0dfdd
push 0x3a
lea eax, [ebp - 0x22c]
push eax
call fcn.4ad012e4
mov edi, eax
jmp 0x4ad0b12c
mov dword [0x4ad28a04], 8
push 3
jmp 0x4ad051eb
cmp byte [0x4ad2ca64], 0
je 0x4ad11115
push ebx
jmp 0x4ad11127
cmp edi, edx
mov eax, ebx
jne 0x4ad110cf
lea eax, [ebx + 1]
lea eax, [ecx + eax*2]
mov dword [ebp + 8], eax
jmp 0x4ad0243e
lea eax, [ebx + 1]
jmp 0x4ad024dc
cmp eax, ebx
jne 0x4ad0243e
xor ebx, ebx
jmp 0x4ad0259e
lea eax, [ebp - 0x24]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_GetBinaryTypeW]
test eax, eax
je 0x4ad0243e
cmp dword [ebp - 0x24], 4
jne 0x4ad0243e
jmp 0x4ad02104
mov dword [0x4ad28a04], 0x2331
jmp 0x4ad0dfdd
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4ad11115
test al, 0x10
je 0x4ad11115
push 5
jmp 0x4ad051eb