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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x238
mov eax, dword [0x4ad33b38]
mov ecx, dword [ebp + 0xc]
push ebx
push esi
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push edi
push dword [eax + 0x38]
xor ebx, ebx
mov dword [ebp - 0x218], ecx
mov dword [ebp - 0x21c], ebx
call fcn.4ad02f54
mov esi, eax
cmp esi, ebx
je 0x4ad0d437
push esi
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
mov dword [ebp - 0x220], eax
mov edi, 0x104
cmp dword [ebp - 0x220], edi
jae 0x4ad1374e
cmp byte [0x4ad2fa24], 0
je 0x4ad03619
cmp esi, ebx
je 0x4ad1375d
push 4
push 0x4ad03a8c
push esi
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x4ad1375d
push edi
push ebx
lea eax, [ebp - 0x214]
push eax
call fcn.4ad02c5c
cmp esi, ebx
je 0x4ad0363b
lea eax, [ebp - 0x214]
push esi
push eax
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
xor eax, eax
mov ax, word [0x4ad3468c]
push eax
lea eax, [ebp - 0x214]
push eax
call fcn.4ad03511
mov ax, word [0x4ad34440]
mov word [ebp - 0xc], ax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x214]
push eax
mov word [ebp - 0xa], 0x3a
mov word [ebp - 8], bx
call fcn.4ad0230a
cmp eax, dword [ebp - 0x220]
mov word [ebp - 0xa], bx
sbb eax, eax
neg eax
mov dword [ebp - 0x220], eax
je 0x4ad0893a
xor eax, eax
mov ax, word [0x4ad34440]
push eax
lea eax, [ebp - 0x214]
push eax
call fcn.4ad026cd
mov edi, eax
cmp edi, ebx
je 0x4ad13780
inc edi
inc edi
cmp word [edi], bx
je 0x4ad13826
mov esi, dword [sym.imp.msvcrt.dll_wcscmp]
mov ebx, 0x4ad02d34
push ebx
push edi
call esi
test eax, eax
pop ecx
pop ecx
je 0x4ad13826
push 0x4ad02d2c
push edi
call esi
test eax, eax
pop ecx
pop ecx
je 0x4ad13826
push 0x410
call fcn.4ad0206b
mov esi, eax
test esi, esi
je 0x4ad137bc
cmp dword [ebp - 0x218], 0
je 0x4ad03715
lea eax, [ebp - 0x214]
push eax
push dword [ebp - 0x218]
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
lea eax, [ebp - 0x214]
mov ecx, edi
sub ecx, eax
mov eax, dword [ebp - 0x218]
sar ecx, 1
and word [eax + ecx*2], 0
test eax, eax
je 0x4ad0373a
push ebx
push eax
call dword [sym.imp.msvcrt.dll_wcscat]
pop ecx
pop ecx
push 0x208
push dword [ebp - 0x218]
push esi
call fcn.4ad02ec4
test eax, eax
jne 0x4ad13795
push esi
call fcn.4ad02ea5
mov ax, word [eax]
cmp ax, word [0x4ad34440]
je 0x4ad03773
push 0x4ad0300c
push esi
call dword [sym.imp.msvcrt.dll_wcscat]
pop ecx
pop ecx
push edi
push esi
call dword [sym.imp.msvcrt.dll_wcscat]
push esi
call dword [sym.imp.msvcrt.dll_wcslen]
add esp, 0xc
lea eax, [eax + eax + 2]
push eax
push esi
call fcn.4ad026f3
mov ebx, eax
test ebx, ebx
je 0x4ad137bc
xor eax, eax
mov ax, word [0x4ad34440]
push eax
push ebx
call fcn.4ad026cd
xor edi, edi
mov word [eax], di
inc eax
inc eax
cmp dword [ebp - 0x220], edi
mov dword [ebp - 0x228], eax
je 0x4ad08945
push dword [ebp - 0x218]
call dword [sym.imp.KERNEL32.dll_NeedCurrentDirectoryForExePathW]
cmp eax, edi
mov dword [ebp - 0x224], eax
je 0x4ad0d442
push ebx
call dword [sym.imp.msvcrt.dll_wcslen]
mov esi, eax
inc esi
pop ecx
inc esi
cmp dword [ebp - 0x21c], edi
jne 0x4ad0895a
xor eax, eax
add eax, esi
lea eax, [eax + eax + 4]
push eax
call fcn.4ad0206b
mov edi, eax
test edi, edi
je 0x4ad137bc
cmp dword [ebp - 0x224], 0
je 0x4ad03833
mov esi, 0x4ad03508
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 - 0x220], 0
mov esi, 0x4ad03504
je 0x4ad0896c
push edi
call fcn.4ad03544
push 1
push esi
push edi
call fcn.4ad02d3d
cmp dword [ebp - 0x228], 0
mov dword [ebp - 0x21c], eax
je 0x4ad0d449
push dword [ebp - 0x228]
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
mov dword [ebp - 0x22c], eax
cmp byte [0x4ad2fa24], 0
je 0x4ad0d455
push 0x4ad34690
call fcn.4ad01f78
mov edi, eax
test edi, edi
je 0x4ad0d455
push edi
call fcn.4ad03544
push 1
push esi
push edi
call fcn.4ad02d3d
mov dword [ebp - 0x230], eax
mov edi, dword [ebp - 0x21c]
test edi, edi
je 0x4ad0d45f
push edi
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
mov ebx, eax
test edi, edi
je 0x4ad0d466
push edi
call fcn.4ad02f54
test eax, eax
je 0x4ad038ea
push edi
call fcn.4ad02f54
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.4ad02ea5
mov ax, word [eax]
xor edi, edi
cmp ax, word [0x4ad34440]
je 0x4ad0390b
inc edi
inc ebx
inc esi
mov ecx, dword [ebp - 0x21c]
xor edx, edx
cmp word [ecx], dx
je 0x4ad0d18f
mov eax, dword [ebp - 0x22c]
lea esi, [esi + eax + 1]
cmp esi, 0x104
mov dword [ebp - 0x238], esi
ja 0x4ad137cb
cmp dword [ebp - 0x218], edx
je 0x4ad0395c
push dword [ebp - 0x21c]
push dword [ebp - 0x218]
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x21c]
xor edx, edx
cmp edi, edx
mov eax, ebx
je 0x4ad137e2
cmp edi, edx
lea eax, [ecx + eax*2]
mov dword [ebp - 0x21c], eax
je 0x4ad03993
cmp dword [ebp - 0x218], edx
je 0x4ad0d46d
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0x218]
call dword [sym.imp.msvcrt.dll_wcscat]
pop ecx
pop ecx
xor edx, edx
cmp dword [ebp - 0x218], edx
je 0x4ad0d46d
cmp dword [ebp - 0x228], edx
je 0x4ad039bb
push dword [ebp - 0x228]
push dword [ebp - 0x218]
call dword [sym.imp.msvcrt.dll_wcscat]
pop ecx
pop ecx
mov esi, dword [ebp - 0x218]
push esi
call fcn.4ad02f54
test eax, eax
je 0x4ad039db
push esi
call fcn.4ad02f54
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 - 0x224], eax
mov eax, dword [ebp - 0x218]
cmp word [eax + 2], 0x3a
jne 0x4ad03a07
movzx eax, word [eax]
push eax
call fcn.4ad02bd6
test eax, eax
je 0x4ad038b0
push 0x2e
push dword [ebp - 0x228]
call fcn.4ad026cd
xor ebx, ebx
cmp eax, ebx
je 0x4ad04964
cmp word [eax + 2], bx
je 0x4ad04964
push 1
push dword [ebp - 0x218]
call fcn.4ad03a9b
test eax, eax
je 0x4ad10880
push 0x2e
push dword [ebp - 0x218]
call fcn.4ad026cd
mov edi, eax
cmp edi, ebx
je 0x4ad1088c
mov esi, dword [sym.imp.msvcrt.dll__wcsicmp]
push str..CMD
push edi
call esi
test eax, eax
pop ecx
pop ecx
je 0x4ad045ec
push str..BAT
push edi
call esi
neg eax
pop ecx
sbb eax, eax
pop ecx
inc eax
inc eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.4ad01389
leave
ret 8
mov edi, dword [sym.imp.msvcrt.dll__wcsicmp]
push str..BAT
push esi
call edi
test eax, eax
pop ecx
pop ecx
je 0x4ad045ec
push str..CMD
push esi
call edi
test eax, eax
pop ecx
pop ecx
jne 0x4ad04a6f
push 2
pop eax
jmp 0x4ad03a7c
push 0x2a
push dword [ebp - 0x228]
call fcn.4ad015d7
test eax, eax
jne 0x4ad0d19b
push 0x3f
push dword [ebp - 0x228]
call fcn.4ad015d7
test eax, eax
jne 0x4ad0d19b
mov esi, dword [ebp - 0x230]
push ebx
push 0x4ad0494c
push dword [ebp - 0x224]
push dword [ebp - 0x218]
call fcn.4ad049eb
test eax, eax
jne 0x4ad04a2a
mov eax, dword [0x4ad2b9c4]
cmp eax, ebx
je 0x4ad049c1
cmp eax, 2
jne 0x4ad038b0
push 1
push 0x4ad0191c
push dword [ebp - 0x224]
push dword [ebp - 0x218]
call fcn.4ad049eb
test eax, eax
je 0x4ad038b0
jmp 0x4ad137f9
mov ax, word [esi]
inc esi
inc esi
test ax, ax
jne 0x4ad04a20
cmp word [esi], bx
je 0x4ad049af
push esi
call dword [sym.imp.msvcrt.dll_wcslen]
add eax, dword [ebp - 0x238]
pop ecx
cmp eax, 0x104
ja 0x4ad04a20
push 1
push esi
push dword [ebp - 0x224]
push dword [ebp - 0x218]
call fcn.4ad049eb
test eax, eax
jne 0x4ad045c6
mov eax, dword [0x4ad2b9c4]
cmp eax, 2
je 0x4ad04a20
jmp 0x4ad0d48a
xor eax, eax
jmp 0x4ad03a7b
lea edi, [ebp - 0x214]
jmp 0x4ad036af
push 0x4ad33bbc
call fcn.4ad01f78
mov dword [ebp - 0x21c], eax
jmp 0x4ad037c2
push dword [ebp - 0x21c]
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
jmp 0x4ad037f6
cmp dword [ebp - 0x224], 0
je 0x4ad0897f
push esi
push edi
call dword [sym.imp.msvcrt.dll_wcscat]
pop ecx
pop ecx
cmp dword [ebp - 0x21c], 0
je 0x4ad03845
push dword [ebp - 0x21c]
push edi
call dword [sym.imp.msvcrt.dll_wcscat]
pop ecx
pop ecx
jmp 0x4ad03845
cmp dword [ebp - 0x220], edx
jne 0x4ad0d41c
mov dword [0x4ad2b9c4], 0x2331
xor eax, eax
jmp 0x4ad03a7c
mov eax, dword [0x4ad2b9c4]
cmp eax, edx
je 0x4ad0d19b
cmp eax, 2
jne 0x4ad0d1a5
jmp 0x4ad0d19b
mov dword [ebp - 0x220], ebx
jmp 0x4ad035de
xor esi, esi
jmp 0x4ad037e8
and dword [ebp - 0x22c], 0
jmp 0x4ad0387a
mov edi, str..COM_.EXE_.BAT_.CMD_.VBS_.JS_.WS
jmp 0x4ad0389b
xor ebx, ebx
jmp 0x4ad038c8
xor esi, esi
jmp 0x4ad038f4
mov dword [ebp - 0x224], edx
jmp 0x4ad039e9
cmp dword [0x4ad2b9c4], 5
je 0x4ad03a3d
jmp 0x4ad1088c
cmp eax, ebx
je 0x4ad04a20
jmp 0x4ad049b8
cmp dword [ebp - 0x220], ebx
jne 0x4ad0d478
mov eax, dword [0x4ad2b9c4]
cmp eax, 2
jne 0x4ad137ea
jmp 0x4ad04964
mov dword [0x4ad2b9c4], 0x233f
jmp 0x4ad0d1a5
push str.COMSPEC
call fcn.4ad01f78
mov esi, eax
cmp esi, ebx
jne 0x4ad03619
mov dword [0x4ad2b9c4], 0x23d2
jmp 0x4ad0d1a5
push 0x3a
lea eax, [ebp - 0x214]
push eax
call fcn.4ad015d7
mov edi, eax
jmp 0x4ad036ad
cmp byte [0x4ad2fa24], 0
je 0x4ad0d19b
push dword [ebp - 0x218]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4ad0d19b
jmp 0x4ad13844
mov dword [0x4ad2b9c4], 8
jmp 0x4ad1386a
cmp edi, edx
mov eax, ebx
jne 0x4ad137d4
lea eax, [ebx + 1]
lea eax, [ecx + eax*2]
mov dword [ebp - 0x21c], eax
jmp 0x4ad038b0
lea eax, [ebx + 1]
jmp 0x4ad03966
cmp eax, ebx
jne 0x4ad038b0
xor ebx, ebx
jmp 0x4ad04964
lea eax, [ebp - 0x234]
push eax
push dword [ebp - 0x218]
call dword [sym.imp.KERNEL32.dll_GetBinaryTypeW]
test eax, eax
je 0x4ad038b0
cmp dword [ebp - 0x234], 4
je 0x4ad04a6f
jmp 0x4ad038b0
cmp byte [0x4ad2fa24], 0
je 0x4ad0d19b
push dword [ebp - 0x218]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4ad13853
test al, 0x10
je 0x4ad0d19b
push 5
jmp 0x4ad045ee
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x15
pop ecx
cmp eax, ecx
jne 0x4ad0d19b
mov dword [0x4ad2b9c4], ecx
push 3
jmp 0x4ad045ee