Function at 0x1012cc90
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
test esi, esi
je 0x1012cca8
lock inc dword [esi]
lea eax, [esi + 0xc]
jmp 0x1012ccad
mov eax, 0x10469160
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
or ebx, 0xffffffff
cmp eax, ebx
je 0x1012ccc3
test al, 0x10
jne 0x1012d0c2
test esi, esi
je 0x1012ccd8
mov eax, ebx
lock xadd dword [esi], eax
jne 0x1012ccd8
push esi
call fcn.10450877
add esp, 4
xor esi, esi
nop word [eax + eax]
mov edi, dword [ebp + 8]
test edi, edi
je 0x1012cf01
cmp dword [edi + 4], 0
jbe 0x1012cf01
add edi, 0xc
push 0x5c
push edi
call fcn.104257e0
mov edi, dword [ebp + 8]
mov edx, eax
add esp, 8
test edx, edx
je 0x1012cf01
sub edx, edi
sub edx, 0xc
mov dword [ebp - 8], edx
cmp edx, 0xffffffff
je 0x1012cf08
mov eax, dword [edi + 4]
lea ecx, [edx + 1]
cmp ecx, eax
mov dword [ebp - 0x10], ecx
cmova ecx, eax
mov dword [ebp - 0xc], ecx
test ecx, ecx
je 0x1012ce35
lea eax, [ecx + 1]
mov dword [ebp - 0x14], eax
add eax, 0x10
push eax
call fcn.10450898
add esp, 4
mov dword [ebp - 0x18], eax
lea ecx, [eax + 0xc]
test eax, eax
je 0x1012ce2f
push dword [ebp - 0xc]
mov edx, dword [ebp - 0x14]
add edi, 0xc
mov dword [eax + 4], 0
push edi
mov dword [eax + 8], edx
mov byte [ecx], 0
push ecx
mov dword [eax], 1
call fcn.10425d60
mov edi, dword [ebp - 0x18]
add esp, 0xc
mov eax, dword [ebp - 0xc]
mov byte [eax + edi + 0xc], 0
mov dword [edi + 4], eax
test esi, esi
jne 0x1012cd9c
mov esi, edi
lock inc dword [edi]
jmp 0x1012ce1e
add eax, dword [esi + 4]
mov dword [ebp - 0x14], eax
inc eax
mov dword [ebp - 0x18], eax
add eax, 0x10
push eax
call fcn.10450898
mov ecx, eax
add esp, 4
mov dword [ebp - 0xc], ecx
lea edx, [ecx + 0xc]
test ecx, ecx
je 0x1012ce0a
mov eax, dword [ebp - 0x18]
mov dword [ecx + 4], 0
mov dword [ecx + 8], eax
lea eax, [esi + 0xc]
mov byte [edx], 0
mov dword [ecx], 1
push dword [esi + 4]
push eax
push edx
call fcn.10425d60
push dword [edi + 4]
mov ecx, dword [ebp - 0xc]
lea eax, [edi + 0xc]
push eax
mov eax, dword [esi + 4]
add ecx, 0xc
add eax, ecx
push eax
call fcn.10425d60
mov eax, dword [ebp - 0xc]
add esp, 0x18
mov ecx, dword [ebp - 0x14]
mov dword [eax + 4], ecx
mov byte [eax + ecx + 0xc], 0
mov eax, ebx
lock xadd dword [esi], eax
jne 0x1012ce1b
push esi
call fcn.10450877
add esp, 4
mov esi, dword [ebp - 0xc]
mov eax, ebx
lock xadd dword [edi], eax
jne 0x1012ce2f
push edi
call fcn.10450877
add esp, 4
mov edx, dword [ebp - 8]
mov edi, dword [ebp + 8]
test edi, edi
je 0x1012ce3e
mov ebx, dword [edi + 4]
jmp 0x1012ce40
xor ebx, ebx
mov eax, dword [edi + 4]
mov ecx, eax
sub ecx, dword [ebp - 0x10]
mov dword [ebp - 0xc], ebx
sub ebx, edx
dec ebx
cmp dword [ebp - 0xc], eax
cmova ebx, ecx
mov dword [ebp - 0xc], ebx
xor ebx, ebx
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x1012ceb2
inc eax
mov dword [ebp - 0x18], eax
add eax, 0x10
push eax
call fcn.10450898
mov ebx, eax
add esp, 4
lea ecx, [ebx + 0xc]
test ebx, ebx
je 0x1012ceaf
mov eax, dword [ebp - 0x18]
push dword [ebp - 0xc]
mov dword [ebx + 8], eax
mov eax, dword [ebp - 0x10]
add eax, 0xc
mov dword [ebx + 4], 0
add eax, edi
mov byte [ecx], 0
push eax
push ecx
mov dword [ebx], 1
call fcn.10425d60
mov eax, dword [ebp - 0xc]
add esp, 0xc
mov byte [eax + ebx + 0xc], 0
mov dword [ebx + 4], eax
mov edi, dword [ebp + 8]
cmp ebx, edi
je 0x1012cedd
test edi, edi
je 0x1012cecc
or eax, 0xffffffff
lock xadd dword [edi], eax
jne 0x1012cecc
push edi
call fcn.10450877
add esp, 4
mov eax, dword [ebp - 8]
mov dword [ebp + 8], ebx
or ebx, 0xffffffff
mov dword [ebp - 8], eax
jmp 0x1012cfe6
test ebx, ebx
je 0x1012cef3
or eax, 0xffffffff
lock xadd dword [ebx], eax
jne 0x1012cef3
push ebx
call fcn.10450877
add esp, 4
mov eax, dword [ebp - 8]
or ebx, 0xffffffff
mov dword [ebp - 8], eax
jmp 0x1012cfe6
mov dword [ebp - 8], 0xffffffff
test esi, esi
jne 0x1012cf5c
test edi, edi
je 0x1012cfee
mov esi, edi
test esi, esi
je 0x1012cfee
lock inc dword [esi]
lock inc dword [esi]
lea eax, [esi + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x1012cf3b
test al, 0x10
jne 0x1012d00f
test esi, esi
je 0x1012cff8
mov eax, ebx
lock xadd dword [esi], eax
jne 0x1012cf54
push esi
call fcn.10450877
add esp, 4
lea eax, [esi + 0xc]
jmp 0x1012cffd
test edi, edi
je 0x1012cf21
mov eax, dword [edi + 4]
add eax, dword [esi + 4]
mov dword [ebp - 0x14], eax
inc eax
mov dword [ebp - 0x18], eax
add eax, 0x10
push eax
call fcn.10450898
mov ecx, eax
add esp, 4
mov dword [ebp - 0x10], ecx
lea edx, [ecx + 0xc]
test ecx, ecx
je 0x1012cfd0
mov eax, dword [ebp - 0x18]
mov dword [ecx + 4], 0
mov dword [ecx + 8], eax
lea eax, [esi + 0xc]
mov byte [edx], 0
mov dword [ecx], 1
push dword [esi + 4]
push eax
push edx
call fcn.10425d60
push dword [edi + 4]
mov eax, dword [esi + 4]
add edi, 0xc
push edi
mov edi, dword [ebp - 0x10]
add eax, 0xc
add eax, edi
push eax
call fcn.10425d60
mov eax, dword [ebp - 0x14]
add esp, 0x18
mov dword [edi + 4], eax
mov byte [edi + eax + 0xc], 0
jmp 0x1012cfd3
mov edi, dword [ebp - 0x10]
mov eax, ebx
lock xadd dword [esi], eax
jne 0x1012cfe4
push esi
call fcn.10450877
add esp, 4
mov esi, edi
test esi, esi
jne 0x1012cf21
mov eax, 0x10469160
jmp 0x1012cf27
mov eax, 0x10469160
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x1012d024
mov byte [ebp - 1], al
jmp 0x1012d087
test esi, esi
je 0x1012d024
mov eax, ebx
lock xadd dword [esi], eax
jne 0x1012d024
push esi
call fcn.10450877
add esp, 4
cmp dword [ebp - 8], 0xffffffff
jne 0x1012cce0
mov edi, dword [ebp + 8]
test edi, edi
je 0x1012d03d
lock inc dword [edi]
lea eax, [edi + 0xc]
jmp 0x1012d042
mov eax, 0x10469160
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x1012d06a
test edi, edi
je 0x1012d063
mov eax, ebx
lock xadd dword [edi], eax
jne 0x1012d063
push edi
call fcn.10450877
add esp, 4
xor al, al
mov byte [ebp - 1], al
jmp 0x1012d087
test al, 0x10
je 0x1012d04e
test edi, edi
je 0x1012d083
mov eax, ebx
lock xadd dword [edi], eax
jne 0x1012d083
push edi
call fcn.10450877
add esp, 4
mov byte [ebp - 1], 1
test esi, esi
je 0x1012d09c
mov eax, ebx
lock xadd dword [esi], eax
jne 0x1012d09c
push esi
call fcn.10450877
add esp, 4
mov al, byte [ebp - 1]
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x1012d0b9
lock xadd dword [ecx], ebx
dec ebx
jne 0x1012d0b9
push ecx
call fcn.10450877
mov al, byte [ebp - 1]
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
or ebx, 0xffffffff
test esi, esi
je 0x1012d0da
mov eax, ebx
lock xadd dword [esi], eax
jne 0x1012d0da
push esi
call fcn.10450877
add esp, 4
mov al, 1
mov byte [ebp - 1], al
jmp 0x1012d09f