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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1001a116
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x4e34
call fcn.1000e2f0
mov eax, dword [0x100213d0]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, ecx
xor ebx, ebx
mov dword [ebp - 0x4e44], esi
mov dword [ebp - 0x4e38], 1
mov dword [ebp - 0x4e3c], ebx
push dword [esi + 0x98]
lea eax, [ebp - 0x4e34]
push eax
mov dword [ebp - 4], ebx
call sub.MSVCR100.dll_strcpy
mov eax, dword [esi + 0xb4]
pop ecx
pop ecx
cmp eax, ebx
je 0x1000228f
cmp byte [eax], bl
je 0x1000228f
lea eax, [ebp - 0x4e34]
push eax
call sub.MSVCR100.dll_strlen
push dword [esi + 0xb4]
mov edi, eax
call sub.MSVCR100.dll_strlen
pop ecx
pop ecx
cmp edi, eax
jle 0x1000228f
sub edi, eax
lea edi, [ebp + edi - 0x4e34]
cmp byte [edi - 1], 0x2e
jne 0x1000228f
push dword [esi + 0xb4]
push edi
call dword [sym.imp.MSVCR100.dll__stricmp]
pop ecx
pop ecx
test eax, eax
jne 0x1000228f
mov byte [edi - 1], bl
mov edi, dword [sym.imp.MSVCR100.dll_strrchr]
lea eax, [ebp - 0x4e34]
push 0x2e
push eax
call edi
mov dword [ebp - 0x4e40], eax
lea eax, [ebp - 0x4e34]
push 0x5c
push eax
call edi
mov edi, dword [ebp - 0x4e40]
add esp, 0x10
cmp edi, ebx
je 0x100022d0
cmp eax, edi
jbe 0x100022ca
mov dword [ebp - 0x4e40], ebx
mov edi, ebx
cmp edi, ebx
je 0x100022d0
mov byte [edi], bl
cmp dword [esi + 0x14], ebx
je 0x1000230c
lea eax, [ebp - 0x4e34]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea eax, [ebp + eax - 0x4e34]
cmp byte [eax - 1], 0x29
jne 0x1000230c
add eax, 0xfffffffe
jmp 0x10002301
mov cl, byte [eax]
cmp cl, 0x30
jl 0x10002305
cmp cl, 0x39
jg 0x10002305
dec eax
cmp byte [eax], bl
jne 0x100022f4
cmp byte [eax], 0x28
jne 0x1000230c
mov byte [eax], bl
mov ecx, 0x10021114
call fcn.10001a1a
mov eax, dword [ebp - 0x4e38]
inc dword [ebp - 0x4e38]
cmp edi, ebx
je 0x10002348
lea ecx, [edi + 1]
push ecx
push eax
lea eax, [ebp - 0x4e34]
push eax
lea eax, [ebp - 0x4e3c]
push str._s__d_._s
push eax
call fcn.1000161d
add esp, 0x14
jmp 0x10002364
push eax
lea eax, [ebp - 0x4e34]
push eax
lea eax, [ebp - 0x4e3c]
push str._s__d_
push eax
call fcn.1000161d
add esp, 0x10
push dword [ebp - 0x4e3c]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x10002316
mov eax, dword [esi + 0x98]
cmp eax, ebx
je 0x1000238c
push eax
call sub.MSVCR100.dll_void___cdecl_operator_delete___void__
pop ecx
mov dword [esi + 0x98], ebx
mov dword [esi + 0x98], ebx
mov edi, dword [ebp - 0x4e3c]
mov byte [ebp - 4], 1
cmp edi, ebx
je 0x100023a9
push edi
call sub.MSVCR100.dll_strlen
pop ecx
jmp 0x100023ab
xor eax, eax
inc eax
push eax
call sub.MSVCR100.dll_void____cdecl_operator_new___unsigned_int_
pop ecx
mov dword [esi + 0x98], eax
cmp eax, ebx
jne 0x100023c7
call fcn.100096b5
mov dword [ebp - 4], ebx
jmp 0x10002392
push edi
push eax
mov byte [ebp - 4], bl
call sub.MSVCR100.dll_strcpy
pop ecx
pop ecx
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
push dword [esi + 0x98]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
je 0x100023fa
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
dec dword [0x10021130]
push 0x10021118
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea eax, [ebp - 0x2724]
push eax
push edi
call fcn.10009722
pop ecx
pop ecx
mov dword [ebp - 0x4e38], ebx
lea eax, [ebp - 0x2724]
push eax
mov byte [ebp - 4], 3
push 0x1001c2f4
lea eax, [ebp - 0x4e38]
cmp dword [ebp + 8], ebx
je 0x10002442
push str._s___s_
jmp 0x10002447
push str._s__s
push eax
call fcn.1000161d
add esp, 0x10
push 4
push dword [ebp - 0x4e38]
mov ecx, esi
call fcn.100016b4
push 3
push 0x15
mov ecx, esi
call fcn.10001780
cmp dword [ebp - 0x4e38], ebx
je 0x1000247e
push dword [ebp - 0x4e38]
call sub.MSVCR100.dll_void___cdecl_operator_delete___void__
pop ecx
cmp edi, ebx
je 0x10002489
push edi
call sub.MSVCR100.dll_void___cdecl_operator_delete___void__
pop ecx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.1000dd44
leave
ret 4