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

Disassembly:
push 0x68
push 0x1070290
call fcn.0105bac4
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x70], ebx
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x58], eax
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x6c], edi
mov esi, dword [ebp + 0x14]
mov dword [ebp - 0x74], esi
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x5c], eax
and dword [ebp - 0x50], 0
and dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 1
mov eax, dword [0x1075004]
cmp eax, 0x1075004
je 0x10409b3
test byte [eax + 0x1c], 4
je 0x10409b3
cmp byte [eax + 0x19], 5
jb 0x10409b3
push 0x1002dc0
push 0x21
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010090c5
and dword [esi], 0
mov eax, dword [ebp - 0x5c]
and dword [eax], 0
push dword [ebp - 0x58]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x10409ce
xor eax, eax
jmp 0x1040a28
push 0x1077f7c
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [0x1077f98]
test esi, esi
je 0x10409f3
mov eax, dword [0x1077f94]
cmp eax, 0x2e8ba2e
jbe 0x1040a30
and dword [ebp - 0x48], 0
push 0x1077f7c
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor esi, esi
cmp dword [ebp - 0x4c], esi
je 0x1040a15
cmp dword [ebp - 0x50], esi
jne 0x1040a15
push dword [ebp - 0x4c]
call fcn.0105c21c
mov dword [ebp - 0x4c], esi
mov eax, dword [ebp - 0x74]
mov ecx, dword [ebp - 0x4c]
mov dword [eax], ecx
mov eax, dword [ebp - 0x5c]
mov ecx, dword [ebp - 0x50]
mov dword [eax], ecx
mov eax, dword [ebp - 0x48]
call fcn.0105bb0c
ret 0x14
imul eax, eax, 0x58
push eax
call fcn.0105c184
mov dword [ebp - 0x4c], eax
test eax, eax
je 0x10409ef
push 0x100301c
push dword [ebp - 0x58]
push dword [edi + 4]
call fcn.0103f134
cmp eax, 1
jge 0x1040a5a
jmp 0x10409ef
mov esi, dword [ebp - 0x60]
cmp esi, 0x1077f98
je 0x10409f3
add esi, 0xfffffff8
mov dword [ebp - 0x54], esi
mov eax, dword [esi + 8]
mov dword [ebp - 0x60], eax
and dword [edi + 0x3c], 0
and dword [edi + 0x40], 0
lea eax, [ebx + 0x5c0]
mov dword [ebp - 0x64], eax
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea ecx, [ebx + 0x5b8]
mov eax, dword [ecx]
test eax, eax
je 0x1040a96
cmp eax, ecx
jne 0x1040ad1
push dword [ebp - 0x64]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp - 0x50]
imul eax, eax, 0x58
mov ecx, dword [ebp - 0x4c]
add eax, ecx
lea ecx, [eax + 0x50]
xor edx, edx
mov dword [ecx], edx
add eax, 0x54
mov dword [eax], edx
mov dword [ebp - 4], edx
push eax
push ecx
push edi
call dword [esi + 0x30]
mov dword [ebp - 0x78], eax
mov dword [ebp - 4], 0xfffffffe
jmp 0x1040b85
mov eax, dword [ebp - 0x68]
mov dword [ebp - 0x58], eax
mov ecx, dword [eax]
mov dword [ebp - 0x68], ecx
cmp dword [eax + 0x10], esi
jne 0x1040b08
push dword [eax + 0xc]
call fcn.0105c184
mov dword [edi + 0x3c], eax
test eax, eax
je 0x1040b15
mov ecx, dword [ebp - 0x58]
push dword [ecx + 0xc]
push dword [ecx + 8]
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov eax, dword [ebp - 0x58]
mov eax, dword [eax + 0xc]
mov dword [edi + 0x40], eax
lea eax, [ebx + 0x5b8]
cmp dword [ebp - 0x68], eax
jne 0x1040ace
jmp 0x1040a96
mov eax, dword [0x1075004]
cmp eax, 0x1075004
je 0x1040b4b
test byte [eax + 0x1c], 4
je 0x1040b4b
cmp byte [eax + 0x19], 2
jb 0x1040b4b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x1002dc0
push 0x22
mov eax, dword [0x1075004]
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0101463a
push dword [ebp - 0x64]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x10409ef
cmp dword [ebp - 0x78], 0
jne 0x1040a57
push dword [ebx + 0xc]
push dword [ebx + 8]
push 0x1002254
push 0x14
lea eax, [ebp - 0x44]
push eax
call fcn.01009a76
add esp, 0x14
test eax, eax
jge 0x1040bdf
mov ecx, dword [0x1075004]
cmp ecx, 0x1075004
je 0x1040bd9
test byte [ecx + 0x1c], 4
je 0x1040bd9
cmp byte [ecx + 0x19], 2
jb 0x1040bd9
push eax
push 0x1002dc0
push 0x23
push dword [ecx + 0x14]
push dword [ecx + 0x10]
call fcn.0101463a
xor eax, eax
mov word [ebp - 0x44], ax
mov eax, dword [ebx + 0x5d8]
push dword [esi + 0x28]
mov ecx, dword [esi + 0x34]
add ecx, 0x28
push ecx
push dword [ebx + 0x34]
push dword [eax + 0x20]
push dword [eax + 0x34]
lea eax, [ebp - 0x44]
push eax
push 0xc0007d59
push 6
push 1
push 3
call fcn.0105d809
add esp, 0x28
mov eax, dword [ebp - 0x50]
imul eax, eax, 0x58
mov ecx, dword [ebp - 0x4c]
lea edi, [eax + ecx]
push 0x27
push edi
lea eax, [esi + 0x10]
push eax
call dword [sym.imp.ole32.dll_StringFromGUID2]
mov eax, dword [edi + 0x54]
test eax, eax
je 0x1040cf8
mov ecx, dword [edi + 0x50]
mov dword [ebp - 0x54], ecx
push eax
call fcn.0105c184
mov dword [edi + 0x50], eax
test eax, eax
je 0x1040cbd
push dword [edi + 0x54]
push dword [ebp - 0x54]
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov esi, dword [esi + 0x34]
push 2
lea eax, [esi + 0x28]
push eax
push dword [ebp - 0x54]
push 0
push dword [esi + 0x640]
call fcn.01049874
test eax, eax
jne 0x1040cf8
mov eax, dword [0x1075004]
cmp eax, 0x1075004
je 0x10409ef
test byte [eax + 0x1c], 4
je 0x10409ef
cmp byte [eax + 0x19], 2
jb 0x10409ef
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x1002dc0
push 0x25
mov eax, dword [0x1075004]
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0101463a
jmp 0x10409ef
mov eax, dword [0x1075004]
cmp eax, 0x1075004
je 0x10409ef
test byte [eax + 0x1c], 4
je 0x10409ef
cmp byte [eax + 0x19], 2
jb 0x10409ef
push 0x1002dc0
push 0x24
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010090c5
jmp 0x10409ef
xor eax, eax
cmp dword [edi + 0x54], eax
je 0x1040d04
cmp dword [edi + 0x50], eax
jne 0x1040d0a
mov dword [edi + 0x50], eax
mov dword [edi + 0x54], eax
inc dword [ebp - 0x50]
mov edi, dword [ebp - 0x6c]
jmp 0x1040a57