Function at 0x476950
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4da47d
mov eax, dword fs:[0]
push eax
sub esp, 0x40
mov eax, dword [0x51a3c4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
mov dword [ebp - 0x48], edi
mov eax, dword fs:[0x2c]
mov ecx, dword [0x5229d0]
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x521cac]
cmp eax, dword [ecx + 4]
jg 0x476bd2
mov eax, dword [0x521ca8]
cmp dword [eax - 0xc], 0
jne 0x476b94
lea eax, [ebp - 0x4c]
push 0x4e098c
push eax
call fcn.00486670
add esp, 8
mov eax, dword [eax]
xor ecx, ecx
mov dword [ebp - 0x28], 0
mov word [ebp - 0x28], cx
lea ecx, [ebp - 0x28]
push eax
mov dword [ebp - 4], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
call fcn.00408e20
mov edx, dword [ebp - 0x4c]
or esi, 0xffffffff
mov byte [ebp - 4], 2
add edx, 0xfffffff0
mov eax, esi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x476a0e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
jb 0x476a1a
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x476aac
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
jb 0x476a35
mov eax, dword [ebp - 0x28]
push eax
lea ecx, [ebp - 0x44]
call fcn.004751c0
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x44]
mov byte [ebp - 4], 3
push eax
lea eax, [ebp - 0x48]
push eax
call fcn.00484230
add esp, 0x18
push eax
mov ecx, 0x521ca8
mov byte [ebp - 4], 4
call fcn.004758c0
mov edx, dword [ebp - 0x48]
mov eax, esi
mov byte [ebp - 4], 3
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x476a87
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x44]
mov byte [ebp - 4], 2
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], esi
dec esi
test esi, esi
jg 0x476b3a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x476b3a
lea eax, [ebp - 0x40]
push eax
call fcn.00482050
add esp, 4
cmp dword [eax + 0x14], 8
mov byte [ebp - 4], 5
jb 0x476ac4
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x44]
call fcn.004751c0
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x44]
mov byte [ebp - 4], 6
push eax
lea eax, [ebp - 0x48]
push eax
call fcn.00484230
add esp, 0x18
push eax
mov ecx, 0x521ca8
mov byte [ebp - 4], 7
call fcn.004758c0
mov edx, dword [ebp - 0x48]
mov eax, esi
mov byte [ebp - 4], 6
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x476b16
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x44]
mov byte [ebp - 4], 5
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], esi
dec esi
test esi, esi
jg 0x476b32
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x40]
call fcn.004074f0
mov edx, dword [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
cmp edx, 8
jb 0x476b7b
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x476b71
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x476c2a
push edx
push ecx
call fcn.004a42a7
add esp, 8
xor eax, eax
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
mov eax, dword [0x521ca8]
mov dword [ebp - 0x14], 7
xor ecx, ecx
mov dword [edi], 0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 7
mov word [edi], cx
mov ecx, edi
push eax
call fcn.00408e20
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004a44be
mov esp, ebp
pop ebp
ret
push 0x521cac
call fcn.004a43e8
add esp, 4
cmp dword [0x521cac], 0xffffffff
jne 0x4769a0
call fcn.004762a0
mov ecx, eax
test ecx, ecx
jne 0x476c01
push 0x80004005
call fcn.00475e90
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
push 0x4deaa0
mov dword [0x521ca8], eax
call fcn.004a4200
push 0x521cac
call fcn.004a439e
add esp, 8
jmp 0x4769a0
call fcn.004aba7f
int3