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

Disassembly:
mov eax, 0x12088950
call fcn.12055780
sub esp, 0x26c
push ebx
push esi
push edi
lea ecx, [ebp - 0x3c]
mov dword [ebp - 0x10], esp
call fcn.1206d639
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
and dword [ebp - 4], 0
and dword [eax], 0
test esi, esi
je 0x1202304f
cmp byte [esi], 0
je 0x1202304f
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x1202304f
push 0x20
push esi
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 1
call fcn.120758c3
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 2
call fcn.12075d1a
mov edi, eax
lea esi, [edi + 1]
push esi
call fcn.12056fe5
mov ebx, eax
push esi
push 0
push ebx
mov dword [ebp - 0x18], ebx
call fcn.12055850
mov eax, dword [ebp - 0x28]
add esp, 0x10
lea ecx, [ebp - 0x28]
push edi
push ebx
call dword [eax + 0x34]
cmp edi, eax
jne 0x1202300a
push str..esf
push dword [ebp + 8]
call fcn.12055ca0
pop ecx
test eax, eax
pop ecx
jne 0x1202301f
push str..ESF
push dword [ebp + 8]
call fcn.12055ca0
pop ecx
test eax, eax
pop ecx
jne 0x1202301f
mov esi, ebx
lea edi, [ebp - 0x78]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
cmp byte [ebp - 0x78], 0xa0
jne 0x1202300a
cmp word [ebp - 0x76], 1
jne 0x1202300a
lea esi, [ebx + 0x10]
call fcn.12023078
push 0xffffffffffffffff
push 0
lea ecx, [ebp - 0x3c]
call fcn.1206d6cc
cmp byte [esi], 0xa2
jne 0x1202300a
mov bl, byte [esi + 1]
inc esi
inc esi
and byte [ebp + 0xb], 0
cmp byte [ebp + 0xb], bl
jae 0x12022f22
mov al, byte [esi]
inc esi
movzx edi, al
lea eax, [edi + 1]
push eax
lea eax, [ebp - 0x178]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea eax, [ebp - 0x178]
lea ecx, [ebp - 0x3c]
push eax
push dword [ebp - 0x34]
call fcn.1206d8e2
add esi, edi
inc byte [ebp + 0xb]
jmp 0x12022eec
push 0x400
lea ecx, [ebp - 0x68]
xor ebx, ebx
call fcn.1207bc55
mov byte [ebp - 4], 3
mov al, byte [esi]
test al, al
je 0x12022fd8
test ebx, ebx
jne 0x12022fd8
movzx eax, al
inc esi
sub eax, 0xa1
je 0x12022fd0
sub eax, 0xf
je 0x12022fab
dec eax
je 0x12022f9a
dec eax
je 0x12022f8c
dec eax
jne 0x12022f35
mov al, byte [esi]
inc esi
movzx edi, al
lea eax, [edi + 1]
push eax
lea eax, [ebp - 0x278]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea eax, [ebp - 0x278]
push edi
push eax
lea ecx, [ebp - 0x68]
call fcn.1207be78
add esi, edi
jmp 0x12022f35
mov al, byte [esi]
inc esi
mov byte [ebp + 0xb], al
push 1
lea eax, [ebp + 0xb]
push eax
jmp 0x12022fc3
mov al, byte [esi]
mov ecx, dword [ebp - 0x38]
movzx eax, al
inc esi
mov eax, dword [ecx + eax*4]
push dword [eax - 8]
jmp 0x12022f97
mov al, byte [esi]
inc esi
movzx eax, al
lea eax, [eax + eax*2]
shl eax, 2
push dword [eax + 0x120b0770]
push dword [eax + 0x120b076c]
lea ecx, [ebp - 0x68]
call fcn.1207be78
jmp 0x12022f35
push 1
pop ebx
jmp 0x12022f35
and byte [ebp - 0x11], 0
lea eax, [ebp - 0x11]
push 1
push eax
lea ecx, [ebp - 0x68]
call fcn.1207be78
test ebx, ebx
je 0x12022ffb
lea ecx, [ebp - 0x68]
call fcn.1207bd08
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
lea ecx, [ebp - 0x68]
mov byte [ebp - 4], 2
call fcn.1207bd1a
mov ebx, dword [ebp - 0x18]
push ebx
call fcn.12056c2d
pop ecx
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x28]
call fcn.12075963
jmp 0x1202304f
mov eax, dword [ebp + 0xc]
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 1
mov dword [eax], ebx
call fcn.12075963
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x3c]
call fcn.1206d66c
push 1
pop eax
jmp 0x12023069
mov ecx, dword [ebp + 0xc]
xor eax, eax
cmp dword [ecx], eax
lea ecx, [ebp - 0x3c]
setne al
or dword [ebp - 4], 0xffffffff
mov esi, eax
call fcn.1206d66c
mov eax, esi
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret