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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x21c
mov eax, dword [0x4ad240ac]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x210], eax
mov eax, dword [ebp + 0x18]
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x218], eax
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x214], eax
mov eax, dword [ebp + 0x24]
push edi
push 0x4ad032e4
mov dword [ebp - 0x21c], eax
call fcn.4ad0321b
push eax
call fcn.4ad09a0d
push 0
push 0
push dword [esi + 0x3c]
call fcn.4ad022ca
mov ebx, eax
push edi
push ebx
call fcn.4ad09a0d
test eax, eax
je 0x4ad0b5ff
mov ax, word [ebx]
inc ebx
inc ebx
test ax, ax
jne 0x4ad0b5f5
mov eax, ebx
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x4ad0b604
sub eax, edx
sar eax, 1
mov edi, eax
je 0x4ad15dab
cmp edi, 0x104
jae 0x4ad10ea7
mov eax, ebx
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x4ad0b62b
sub eax, edx
sar eax, 1
push ebx
mov esi, eax
call fcn.4ad02598
push eax
inc esi
push esi
push ebx
call fcn.4ad0185a
push ebx
call fcn.4ad09662
mov ecx, dword [ebp - 0x214]
mov dword [ecx], eax
cmp eax, 1
je 0x4ad15db5
lea esi, [ebx + edi*2 + 2]
cmp word [esi], 0
je 0x4ad15dbd
push esi
call fcn.4ad0413b
cmp word [eax], 0
jne 0x4ad15dab
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x4ad0b684
sub eax, edx
sar eax, 1
cmp eax, 0x104
ja 0x4ad10ea7
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x4ad0b6a2
sub eax, edx
sar eax, 1
push esi
mov edi, eax
call fcn.4ad02598
push eax
inc edi
push edi
push esi
call fcn.4ad0185a
movzx eax, word [esi + 2]
cmp ax, 0x3a
jne 0x4ad15de4
push esi
push 0x104
lea eax, [ebp - 0x20c]
push eax
call fcn.4ad0185a
mov esi, dword [ebp + 0x14]
push ebx
push esi
push dword [ebp - 0x210]
call fcn.4ad02faf
test eax, eax
jne 0x4ad10ea7
mov ebx, dword [ebp - 0x214]
mov eax, dword [ebx]
mov eax, dword [eax + 0x18]
test byte [eax], 0x10
jne 0x4ad0b757
movzx eax, word [0x4ad40664]
push eax
push dword [ebp - 0x210]
call fcn.4ad02148
mov edi, eax
test edi, edi
je 0x4ad10eb1
inc edi
inc edi
movzx eax, word [0x4ad40664]
push eax
mov eax, dword [ebx]
push dword [eax + 0x10]
call fcn.4ad02148
test eax, eax
jne 0x4ad0b743
mov eax, dword [ebx]
mov eax, dword [eax + 0x10]
push eax
mov eax, edi
sub eax, dword [ebp - 0x210]
sar eax, 1
sub esi, eax
push esi
push edi
call fcn.4ad0185a
mov ebx, dword [ebp - 0x218]
lea eax, [ebp - 0x20c]
push eax
push dword [ebp + 0x1c]
push ebx
call fcn.4ad02faf
test eax, eax
jne 0x4ad10ea7
xor esi, esi
push esi
mov dword [0x4ad24128], esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edi, dword [ebp - 0x21c]
and dword [edi], esi
push ebx
call fcn.4ad02ed1
mov ax, word [eax]
cmp ax, word [0x4ad40664]
je 0x4ad15e64
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4ad0fe19
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x4ad24128], eax
test eax, eax
je 0x4ad0b7ca
cmp eax, 2
jne 0x4ad15e84
test esi, esi
jne 0x4ad10e8d
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.4ad013a9
leave
ret 0x20
test al, 0x10
je 0x4ad0b7ca
xor esi, esi
inc esi
mov dword [edi], esi
jmp 0x4ad0b7ca
movzx eax, word [0x4ad40664]
push eax
push dword [ebp - 0x210]
call fcn.4ad02148
mov ecx, eax
lea esi, [ecx + 2]
jmp 0x4ad10ebc
push 0x232e
jmp 0x4ad15db0
mov edi, dword [ebp - 0x210]
jmp 0x4ad0b728
mov dx, word [ecx]
inc ecx
inc ecx
test dx, dx
jne 0x4ad10ebc
sub ecx, esi
sar ecx, 1
mov esi, ecx
mov ecx, ebx
lea edx, [ecx + 2]
mov di, word [ecx]
inc ecx
inc ecx
test di, di
jne 0x4ad10ed1
sub ecx, edx
sar ecx, 1
lea ecx, [ecx + esi + 1]
cmp ecx, 0x104
ja 0x4ad10ea7
push eax
push dword [ebp + 0x1c]
push ebx
call fcn.4ad020a9
jmp 0x4ad0b7d2
push 0x232a
call fcn.4ad1df02
push dword [0x4ad24128]
jmp 0x4ad15db0
mov eax, dword [0x4ad24124]
mov ax, word [eax]
mov word [ebp - 0x20c], ax
push 0x3a
pop eax
mov word [ebp - 0x20a], ax
xor eax, eax
mov word [ebp - 0x208], ax
jmp 0x4ad0b6e1
cmp word [esi], 0x5c
jne 0x4ad15df4
cmp ax, 0x5c
je 0x4ad0b6cf
mov eax, dword [0x4ad24124]
mov ax, word [eax]
mov word [ebp - 0x20c], ax
push 0x3a
pop eax
mov word [ebp - 0x20a], ax
xor eax, eax
mov word [ebp - 0x208], ax
lea eax, [ebp - 0x20c]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x4ad15e1f
sub eax, edx
mov ecx, esi
sar eax, 1
lea edx, [ecx + 2]
mov di, word [ecx]
inc ecx
inc ecx
test di, di
jne 0x4ad15e32
sub ecx, edx
sar ecx, 1
lea ecx, [ecx + eax + 1]
mov eax, 0x104
cmp ecx, eax
ja 0x4ad10ea7
push esi
push eax
lea eax, [ebp - 0x20c]
push eax
call fcn.4ad020a9
jmp 0x4ad0b6e1
mov eax, ebx
inc esi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x4ad15e6a
sub eax, edx
sar eax, 1
xor ecx, ecx
mov word [ebx + eax*2 - 2], cx
jmp 0x4ad0b7a2
cmp eax, 3
je 0x4ad0b7ca
push eax
jmp 0x4ad15db0