Function at 0x1021273
Capabilities:
Check if file exists

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x214
mov eax, dword [0x1033f70]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
push esi
push edi
mov dword [ebp - 0x214], ecx
mov dword [ebp - 0x210], eax
cmp eax, ebx
je 0x10212ab
cmp dword [ebp + 0xc], 6
je 0x10212ab
push 8
pop edi
jmp 0x10212ad
xor edi, edi
cmp ecx, ebx
jne 0x10212d4
push ebx
push 0x57
call fcn.010285de
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x10214ab
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x10214ab
cmp dword [ebp + 0x14], ebx
je 0x10212f9
cmp dword [ebp + 0x10], 6
jne 0x10212f9
push ebx
push 0x32
call fcn.010285de
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x10214ab
push 0x32
jmp 0x10212c9
push 0x30
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
cmp esi, ebx
je 0x10214ab
or edi, dword [ebp + 0xc]
push dword [ebp - 0x214]
mov dword [esi], edi
call fcn.0101e529
mov dword [esi + 4], eax
cmp eax, ebx
je 0x10214a5
mov eax, dword [ebp + 0xc]
and eax, 3
cmp al, 3
je 0x1021343
mov eax, dword [ebp + 0xc]
and eax, 6
cmp al, 6
jne 0x1021358
push esi
call fcn.01020b5d
test eax, eax
jne 0x1021358
push 0x1012dc8
push ebx
jmp 0x10214a0
mov edi, 0x104
push edi
lea eax, [ebp - 0x20c]
push eax
push 0x102
push dword [esi + 4]
call fcn.0101e8c1
test eax, eax
je 0x10214a5
cmp dword [ebp + 0xc], 1
lea eax, [ebp - 0x20c]
push eax
je 0x102138e
call fcn.01028624
jmp 0x1021393
call fcn.0102cce4
mov dword [esi + 0x18], eax
cmp eax, ebx
jne 0x10213c6
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x10213ac
push 0x1012d70
jmp 0x1021352
lea eax, [ebp - 0x20c]
push eax
call fcn.0102cea0
mov dword [esi + 0x18], eax
cmp eax, ebx
jne 0x10213c6
push 0x1012d00
jmp 0x1021352
push edi
lea eax, [ebp - 0x20c]
push eax
push 0x103
push dword [ebp - 0x214]
call fcn.0101e8c1
test eax, eax
je 0x10214a5
mov ebx, 0x400
push ebx
push dword [ebp + 0xc]
xor edi, edi
push edi
lea eax, [ebp - 0x20c]
push eax
call fcn.01024b14
mov dword [esi + 0x1c], eax
cmp eax, edi
je 0x1021436
push eax
call fcn.010221d1
cmp eax, edi
je 0x1021436
push eax
call fcn.0101e529
mov dword [esi + 8], eax
cmp eax, edi
jne 0x1021436
push 0x1012c98
push 8
call fcn.010285de
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x10214a5
push 8
jmp 0x102146f
mov eax, dword [esi + 8]
cmp eax, edi
je 0x1021477
cmp dword [ebp - 0x210], edi
je 0x1021477
push 1
push dword [ebp - 0x210]
push eax
call fcn.0101cfad
test eax, eax
je 0x1021477
push 0x1012be8
push 0x57
call fcn.010285de
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x10214a5
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x10214a5
cmp dword [ebp + 0x14], edi
lea eax, [esi + 0xc]
push eax
lea edi, [esi + 0x10]
push edi
jne 0x1021491
push dword [esi + 4]
push dword [esi + 8]
call fcn.01020089
jmp 0x1021496
call fcn.01020205
test eax, eax
jne 0x10214af
push 0x1012b88
push eax
call fcn.010285de
push esi
call fcn.01020c2f
xor eax, eax
jmp 0x1021509
mov eax, dword [edi]
xor edi, edi
cmp eax, edi
jl 0x1021501
push 0x104
lea ecx, [ebp - 0x20c]
push ecx
push eax
push 0x101
push dword [esi + 4]
call fcn.0101ec5e
test eax, eax
je 0x1021501
push dword [ebp + 0x14]
lea eax, [ebp - 0x20c]
push edi
push ebx
push dword [ebp + 0xc]
push dword [ebp + 0x10]
push dword [esi + 8]
push eax
call fcn.01025938
mov dword [esi + 0x20], eax
cmp eax, edi
jne 0x1021501
push 0x1012b54
push edi
call fcn.010285de
mov dword [esi + 0x24], edi
mov dword [esi + 0x28], edi
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0101c23d
leave
ret 0x10