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

Disassembly:
push ebp
sub esp, 0x64
push 0x2c
mov eax, 0x4b5ba9
call fcn.0048ccde
mov edi, ecx
mov dword [ebp + 0xc], 0x4ef8c0
xor ebx, ebx
mov dword [ebp - 4], ebx
push ebx
push 1
call fcn.00413009
pop ecx
pop ecx
mov dword [ebp + 0x60], eax
mov dword [ebp + 0x64], eax
mov byte [ebp - 4], 1
cmp eax, ebx
je 0x4031b0
lea ecx, [ebp + 0x3c]
mov dword [eax], ecx
jmp 0x4031b2
xor eax, eax
mov byte [ebp - 4], bl
mov dword [ebp + 0x3c], eax
mov byte [ebp - 4], 2
mov byte [ebp - 4], 3
mov dword [ebp + 0x48], ebx
mov dword [ebp + 0x4c], ebx
mov dword [ebp + 0x50], ebx
mov byte [ebp - 4], 4
mov byte [ebp - 4], 5
mov eax, dword [edi]
mov eax, dword [eax - 0xc]
cmp eax, ebx
jne 0x4031e4
lea eax, [ebp + 0x3c]
push eax
call fcn.00420442
pop ecx
push ebx
push 1
call fcn.00413009
pop ecx
pop ecx
mov dword [ebp + 0x60], eax
mov dword [ebp + 0x64], eax
mov byte [ebp - 4], 6
cmp eax, ebx
je 0x403203
lea ecx, [ebp + 0x24]
mov dword [eax], ecx
jmp 0x403205
xor eax, eax
mov byte [ebp - 4], 5
mov dword [ebp + 0x24], eax
mov byte [ebp - 4], 7
mov byte [ebp - 4], 8
mov dword [ebp + 0x30], ebx
mov dword [ebp + 0x34], ebx
mov dword [ebp + 0x38], ebx
mov byte [ebp - 4], 9
mov ebx, 0x4ef590
lea esi, [ebp + 0x24]
call fcn.00404b52
mov ebx, 0x4ef584
call fcn.00404b52
mov ebx, 0x4ef588
call fcn.00404b52
mov eax, dword [ebp + 0x34]
mov ecx, eax
sub ecx, dword [ebp + 0x30]
sar ecx, 2
test ecx, ecx
ja 0x403259
call fcn.004891d9
mov eax, dword [ebp + 0x34]
sub eax, dword [ebp + 0x30]
sar eax, 2
push 0xffffffffffffffff
xor esi, esi
push esi
push dword [ebp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
cmp eax, 2
ja 0x4035cf
push 0x6c
call fcn.004896b9
pop ecx
mov dword [ebp + 0x60], eax
mov byte [ebp - 4], 0xa
cmp eax, esi
je 0x403292
push eax
call fcn.004016a8
mov esi, eax
mov byte [ebp - 4], 9
mov dword [ebp + 0x18], esi
mov eax, dword [edi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4032af
test al, 0x10
jne 0x4032af
mov bl, 1
jmp 0x4032b1
xor bl, bl
mov eax, dword [edi]
mov eax, dword [eax - 0xc]
test eax, eax
je 0x4032cf
test bl, bl
jne 0x4032cf
push esi
push edi
mov ecx, 0x4ef8c0
call fcn.00402f5d
jmp 0x403565
lea eax, [ebp - 0x30]
push eax
call fcn.00404ba0
mov byte [ebp - 4], 0xb
test bl, bl
je 0x4032f1
push edi
lea edi, [ebp]
lea ebx, [ebp - 0x30]
call fcn.00404c1c
jmp 0x403480
mov edi, dword [ebp + 0x48]
and dword [ebp + 0x5c], 0
cmp edi, dword [ebp + 0x4c]
jbe 0x403302
call fcn.004891d9
mov esi, dword [ebp + 0x3c]
mov dword [ebp + 0x5c], esi
mov dword [ebp + 0x60], edi
mov edi, dword [ebp + 0x4c]
and dword [ebp - 0x38], 0
cmp dword [ebp + 0x48], edi
jbe 0x40331c
call fcn.004891d9
mov eax, dword [ebp + 0x3c]
mov dword [ebp - 0x38], eax
test esi, esi
je 0x40332a
cmp esi, eax
je 0x40332f
call fcn.004891d9
mov ebx, dword [ebp + 0x60]
cmp ebx, edi
je 0x4033a4
test esi, esi
jne 0x40339c
call fcn.004891d9
xor eax, eax
cmp ebx, dword [eax + 0x10]
jb 0x40334b
call fcn.004891d9
push ebx
lea ecx, [ebp + 0x58]
call fcn.00403c69
mov byte [ebp - 4], 0xc
lea ecx, [ebp + 0x58]
call fcn.00403d53
lea eax, [ebp + 0x58]
push eax
lea edi, [ebp]
lea ebx, [ebp - 0x30]
call fcn.00404c1c
mov byte [ebp - 4], 0xb
lea ecx, [ebp + 0x58]
call fcn.0040392e
test esi, esi
jne 0x4033a0
call fcn.004891d9
xor eax, eax
mov ecx, dword [ebp + 0x60]
cmp ecx, dword [eax + 0x10]
jb 0x403393
call fcn.004891d9
add dword [ebp + 0x60], 0x1c
jmp 0x40330b
mov eax, dword [esi]
jmp 0x403341
mov eax, dword [esi]
jmp 0x403386
mov eax, 0x4ef884
mov dword [ebp + 0x60], eax
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [ebp - 4], 0xd
mov eax, dword [0x4ef878]
mov eax, dword [eax]
and dword [ebp + 0x54], 0
mov dword [ebp + 0x58], eax
mov eax, dword [0x4ef860]
mov dword [ebp + 0x54], eax
and dword [ebp + 0x10], 0
mov eax, dword [0x4ef878]
mov dword [ebp + 0x14], eax
mov eax, dword [0x4ef860]
mov dword [ebp + 0x10], eax
lea edi, [ebp + 0x10]
lea esi, [ebp + 0x54]
call fcn.004165fb
test al, al
jne 0x40340b
call fcn.00405d88
add eax, 8
push eax
lea edi, [ebp]
lea ebx, [ebp - 0x30]
call fcn.00404c1c
call fcn.004078e3
jmp 0x4033cd
mov byte [ebp - 4], 0xb
push dword [ebp + 0x60]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea eax, [ebp - 0x30]
push eax
call fcn.0040eca5
lea eax, [ebp - 0x30]
push eax
call fcn.0040f582
lea eax, [ebp + 0x60]
push eax
call fcn.0042a2f0
mov byte [ebp - 4], 0xe
push eax
lea ecx, [ebp - 0x30]
call fcn.0040edf0
add esp, 0x10
mov byte [ebp - 4], 0xb
lea ecx, [ebp + 0x60]
call fcn.0040392e
lea eax, [ebp + 0x64]
push eax
call fcn.0040ef78
pop ecx
mov byte [ebp - 4], 0xf
mov eax, dword [ebp + 0x64]
mov eax, dword [eax - 0xc]
test eax, eax
je 0x403474
lea eax, [ebp + 0x64]
push eax
lea ecx, [ebp - 0x30]
call fcn.0040edf0
pop ecx
mov byte [ebp - 4], 0xb
lea ecx, [ebp + 0x64]
call fcn.0040392e
mov eax, dword [ebp - 0x18]
mov eax, dword [eax]
and dword [ebp + 0x1c], 0
mov ebx, eax
mov dword [ebp + 0x20], ebx
mov esi, dword [ebp - 0x30]
mov dword [ebp + 0x1c], esi
and dword [ebp + 4], 0
mov edi, dword [ebp - 0x18]
mov eax, dword [ebp - 0x30]
mov dword [ebp + 4], eax
test esi, esi
je 0x4034a9
cmp esi, eax
je 0x4034ae
call fcn.004891d9
cmp ebx, edi
je 0x403554
push 0
push dword [0x4ef584]
mov edi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
call edi
test eax, eax
je 0x403554
push 0
push dword [0x4ef588]
call edi
test eax, eax
je 0x403554
push 0xffffffffffffffff
push dword [0x4ef58c]
call edi
mov byte [ebp - 4], 0x10
test esi, esi
jne 0x403543
call fcn.004891d9
xor eax, eax
cmp ebx, dword [eax + 0x18]
jne 0x4034ff
call fcn.004891d9
lea eax, [ebx + 0xc]
push eax
lea ecx, [ebp + 0x64]
call fcn.00403c69
mov byte [ebp - 4], 0x11
push dword [ebp + 0x18]
push dword [ebp + 0xc]
lea ecx, [ebp + 0x64]
call fcn.00402957
mov byte [ebp - 4], 0x10
lea ecx, [ebp + 0x64]
call fcn.0040392e
mov dword [ebp - 4], 0xb
lea esi, [ebp + 0x1c]
call fcn.00408785
mov ebx, dword [ebp + 0x20]
mov esi, dword [ebp + 0x1c]
jmp 0x403494
mov eax, dword [esi]
jmp 0x4034f5
mov byte [ebp - 4], 0x13
mov byte [ebp - 4], 9
lea eax, [ebp - 0x30]
push eax
call fcn.00404bf2
mov esi, 0x4c60ee
push esi
lea ecx, [ebp + 0x60]
call fcn.004038e9
mov byte [ebp - 4], 0x14
push esi
lea ecx, [ebp + 0x58]
call fcn.004038e9
mov byte [ebp - 4], 0x15
push 0x4c5c28
lea ecx, [ebp + 0x64]
call fcn.00403c8f
mov byte [ebp - 4], 0x16
lea eax, [ebp + 0x60]
push eax
lea eax, [ebp + 0x58]
push eax
lea eax, [ebp + 0x64]
push eax
mov esi, dword [ebp + 0x18]
call fcn.00401769
mov byte [ebp - 4], 0x15
lea ecx, [ebp + 0x64]
call fcn.0040392e
mov byte [ebp - 4], 0x14
lea ecx, [ebp + 0x58]
call fcn.0040392e
mov byte [ebp - 4], 9
lea ecx, [ebp + 0x60]
call fcn.0040392e
xor esi, esi
mov byte [ebp - 4], 0x17
cmp dword [ebp + 0x30], esi
je 0x4035e1
push dword [ebp + 0x30]
call fcn.0048867e
pop ecx
mov dword [ebp + 0x30], esi
mov dword [ebp + 0x34], esi
mov dword [ebp + 0x38], esi
mov byte [ebp - 4], 5
lea eax, [ebp + 0x24]
push eax
call fcn.00408d67
mov dword [ebp - 4], 4
mov byte [ebp - 4], 0x19
mov eax, dword [ebp + 0x48]
xor esi, esi
cmp eax, esi
je 0x40361c
push dword [ebp + 0x4c]
call fcn.00407583
push dword [ebp + 0x48]
call fcn.0048867e
pop ecx
mov dword [ebp + 0x48], esi
mov dword [ebp + 0x4c], esi
mov dword [ebp + 0x50], esi
mov byte [ebp - 4], 0
lea eax, [ebp + 0x3c]
push eax
call fcn.00408d67
or dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
add ebp, 0x68
leave
ret