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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x21c
mov eax, dword [0x4a2340ac]
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 0x4a2132e4
mov dword [ebp - 0x21c], eax
call fcn.4a21321b
push eax
call fcn.4a219a0d
push 0
push 0
push dword [esi + 0x3c]
call fcn.4a2122ca
mov ebx, eax
push edi
push ebx
call fcn.4a219a0d
test eax, eax
je 0x4a21b5ff
mov ax, word [ebx]
inc ebx
inc ebx
test ax, ax
jne 0x4a21b5f5
mov eax, ebx
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x4a21b604
sub eax, edx
sar eax, 1
mov edi, eax
je 0x4a225dab
cmp edi, 0x104
jae 0x4a220ea7
mov eax, ebx
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x4a21b62b
sub eax, edx
sar eax, 1
push ebx
mov esi, eax
call fcn.4a212598
push eax
inc esi
push esi
push ebx
call fcn.4a21185a
push ebx
call fcn.4a219662
mov ecx, dword [ebp - 0x214]
mov dword [ecx], eax
cmp eax, 1
je 0x4a225db5
lea esi, [ebx + edi*2 + 2]
cmp word [esi], 0
je 0x4a225dbd
push esi
call fcn.4a21413b
cmp word [eax], 0
jne 0x4a225dab
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x4a21b684
sub eax, edx
sar eax, 1
cmp eax, 0x104
ja 0x4a220ea7
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x4a21b6a2
sub eax, edx
sar eax, 1
push esi
mov edi, eax
call fcn.4a212598
push eax
inc edi
push edi
push esi
call fcn.4a21185a
movzx eax, word [esi + 2]
cmp ax, 0x3a
jne 0x4a225de4
push esi
push 0x104
lea eax, [ebp - 0x20c]
push eax
call fcn.4a21185a
mov esi, dword [ebp + 0x14]
push ebx
push esi
push dword [ebp - 0x210]
call fcn.4a212faf
test eax, eax
jne 0x4a220ea7
mov ebx, dword [ebp - 0x214]
mov eax, dword [ebx]
mov eax, dword [eax + 0x18]
test byte [eax], 0x10
jne 0x4a21b757
movzx eax, word [0x4a250664]
push eax
push dword [ebp - 0x210]
call fcn.4a212148
mov edi, eax
test edi, edi
je 0x4a220eb1
inc edi
inc edi
movzx eax, word [0x4a250664]
push eax
mov eax, dword [ebx]
push dword [eax + 0x10]
call fcn.4a212148
test eax, eax
jne 0x4a21b743
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.4a21185a
mov ebx, dword [ebp - 0x218]
lea eax, [ebp - 0x20c]
push eax
push dword [ebp + 0x1c]
push ebx
call fcn.4a212faf
test eax, eax
jne 0x4a220ea7
xor esi, esi
push esi
mov dword [0x4a234128], esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edi, dword [ebp - 0x21c]
and dword [edi], esi
push ebx
call fcn.4a212ed1
mov ax, word [eax]
cmp ax, word [0x4a250664]
je 0x4a225e64
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4a21fe19
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x4a234128], eax
test eax, eax
je 0x4a21b7ca
cmp eax, 2
jne 0x4a225e84
test esi, esi
jne 0x4a220e8d
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.4a2113a9
leave
ret 0x20
test al, 0x10
je 0x4a21b7ca
xor esi, esi
inc esi
mov dword [edi], esi
jmp 0x4a21b7ca
movzx eax, word [0x4a250664]
push eax
push dword [ebp - 0x210]
call fcn.4a212148
mov ecx, eax
lea esi, [ecx + 2]
jmp 0x4a220ebc
push 0x232e
jmp 0x4a225db0
mov edi, dword [ebp - 0x210]
jmp 0x4a21b728
mov dx, word [ecx]
inc ecx
inc ecx
test dx, dx
jne 0x4a220ebc
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 0x4a220ed1
sub ecx, edx
sar ecx, 1
lea ecx, [ecx + esi + 1]
cmp ecx, 0x104
ja 0x4a220ea7
push eax
push dword [ebp + 0x1c]
push ebx
call fcn.4a2120a9
jmp 0x4a21b7d2
push 0x232a
call fcn.4a22df02
push dword [0x4a234128]
jmp 0x4a225db0
mov eax, dword [0x4a234124]
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 0x4a21b6e1
cmp word [esi], 0x5c
jne 0x4a225df4
cmp ax, 0x5c
je 0x4a21b6cf
mov eax, dword [0x4a234124]
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 0x4a225e1f
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 0x4a225e32
sub ecx, edx
sar ecx, 1
lea ecx, [ecx + eax + 1]
mov eax, 0x104
cmp ecx, eax
ja 0x4a220ea7
push esi
push eax
lea eax, [ebp - 0x20c]
push eax
call fcn.4a2120a9
jmp 0x4a21b6e1
mov eax, ebx
inc esi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x4a225e6a
sub eax, edx
sar eax, 1
xor ecx, ecx
mov word [ebx + eax*2 - 2], cx
jmp 0x4a21b7a2
cmp eax, 3
je 0x4a21b7ca
push eax
jmp 0x4a225db0