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

Disassembly:
sub esp, 0x64
push ebx
push ebp
mov ebx, dword [sym.imp.USER32.dll_SendMessageW]
push esi
push edi
mov edi, ecx
push 0
push 0
mov eax, dword [edi + 4]
push 0x1032
push eax
mov dword [esp + 0x30], edi
call ebx
mov esi, eax
test esi, esi
je 0x47723e
mov ecx, dword [edi + 4]
push 2
push 0xffffffffffffffff
push 0x100c
push ecx
call ebx
mov ebp, eax
inc ebp
je 0x47723e
mov edx, dword [0x4d9540]
lea eax, [esi*4]
push eax
mov dword [esp + 0x18], edx
call fcn.004c6296
add esp, 4
mov dword [esp + 0x28], eax
mov dword [esp + 0x1c], 0
mov dword [esp + 0x24], eax
mov ecx, dword [edi + 4]
lea ebx, [ebp - 1]
push 2
push ebx
push 0x100c
push ecx
call dword [sym.imp.USER32.dll_SendMessageW]
mov edx, dword [edi + 0x84]
inc eax
mov ebp, eax
mov eax, dword [edx + ebx*4]
mov eax, dword [eax + 0x14]
test eax, eax
je 0x477006
mov esi, dword [eax + 8]
test esi, esi
jne 0x476f35
xor eax, eax
jmp 0x476f3c
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push esi
push eax
lea ecx, [esp + 0x1c]
call fcn.00401850
mov ecx, dword [0x4d9540]
mov edx, str._n__n_
test edx, edx
mov dword [esp + 0x10], ecx
je 0x476faf
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
test esi, esi
je 0x476faf
push esi
lea ecx, [esp + 0x14]
call fcn.004012f0
test eax, eax
je 0x476faf
mov ecx, dword [esp + 0x10]
lea eax, [esi + 1]
test eax, eax
mov esi, ecx
jne 0x476f86
test ecx, ecx
jne 0x476fa4
push eax
push ecx
push 0xffffffffffffffff
push str._n__n_
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jle 0x476fa4
mov word [esi + eax*2 - 2], 0
push 0xffffffffffffffff
lea ecx, [esp + 0x14]
call int.00401970
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x14]
push eax
mov eax, dword [eax - 8]
push eax
call fcn.00401850
mov eax, dword [esp + 0x10]
mov edx, dword [0x4d9544]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x476ff0
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x476ff0
mov edx, dword [esp + 0x10]
add edx, 0xfffffff4
push edx
call fcn.004c5432
add esp, 4
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x1c]
inc edx
mov dword [eax], ebx
add eax, 4
mov dword [esp + 0x1c], edx
mov dword [esp + 0x24], eax
test ebp, ebp
jne 0x476efe
mov eax, dword [esp + 0x14]
mov edx, dword [eax - 0xc]
lea ecx, [eax - 0xc]
test edx, edx
jl 0x477029
push ecx
mov dword [esp + 0x1c], eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
jmp 0x47704b
mov ecx, dword [0x4d9540]
mov esi, eax
test eax, eax
mov dword [esp + 0x18], ecx
je 0x477040
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push esi
push eax
lea ecx, [esp + 0x20]
call fcn.00401630
mov eax, dword [esp + 0x78]
test eax, eax
je 0x477067
lea edx, [esp + 0x14]
mov ecx, edi
push edx
call fcn.004772d0
test eax, eax
jne 0x4771d9
mov eax, dword [esp + 0x1c]
dec eax
test eax, eax
jl 0x4771d9
mov ecx, dword [esp + 0x28]
lea edx, [ecx + eax*4]
inc eax
mov dword [esp + 0x1c], edx
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x1c]
mov edx, dword [edi + 0x84]
mov ecx, dword [eax]
mov ebx, dword [edx + ecx*4]
test ebx, ebx
mov dword [esp + 0x28], ebx
je 0x4771bf
mov ebp, dword [ebx + 0x14]
test ebp, ebp
je 0x4771bf
mov esi, dword [ebp + 8]
mov eax, dword [0x4d9540]
test esi, esi
mov dword [esp + 0x10], eax
je 0x477103
mov ecx, esi
shr ecx, 0x10
jne 0x4770d3
and esi, 0xffff
lea ecx, [esp + 0x10]
push esi
call fcn.0040ff70
jmp 0x477103
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edi, eax
test edi, edi
je 0x477103
push edi
lea ecx, [esp + 0x14]
call fcn.004012f0
test eax, eax
je 0x477103
lea ecx, [edi + edi]
mov edi, dword [esp + 0x10]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x78]
lea esi, [ebp + 0x28]
mov ecx, 0x12
lea edi, [esp + 0x2c]
test eax, eax
rep movsd dword es:[edi], dword [esi]
je 0x477129
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x47718c
mov ecx, dword [ebx + 4]
test ecx, ecx
je 0x47717c
mov edx, dword [esp + 0x68]
mov esi, dword [esp + 0x64]
mov edi, dword [esp + 0x38]
mov ebx, dword [esp + 0x34]
mov eax, dword [ecx + 0x14]
test eax, eax
je 0x477175
mov ebp, dword [esp + 0x30]
sub dword [eax + 0x2c], ebp
mov ebp, dword [eax + 0x30]
sub ebp, ebx
mov dword [eax + 0x30], ebp
mov ebp, dword [eax + 0x34]
sbb ebp, edi
mov dword [eax + 0x34], ebp
mov ebp, dword [esp + 0x2c]
sub dword [eax + 0x28], ebp
mov ebp, dword [eax + 0x60]
sub ebp, esi
mov dword [eax + 0x60], ebp
mov ebp, dword [eax + 0x64]
sbb ebp, edx
mov dword [eax + 0x64], ebp
mov ecx, dword [ecx + 4]
test ecx, ecx
jne 0x477140
mov ecx, dword [esp + 0x28]
push 0
push ecx
mov ecx, dword [esp + 0x28]
call fcn.00450950
mov eax, dword [esp + 0x10]
mov ecx, dword [0x4d9544]
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x4771bb
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x4771bb
mov eax, dword [esp + 0x10]
add eax, 0xfffffff4
push eax
call fcn.004c5432
add esp, 4
mov edi, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x24]
sub ecx, 4
dec eax
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x24], eax
jne 0x477084
mov ecx, edi
call fcn.0044fe50
mov eax, dword [esp + 0x18]
mov edx, dword [0x4d9544]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x47720f
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x47720f
mov edx, dword [esp + 0x18]
add edx, 0xfffffff4
push edx
call fcn.004c5432
add esp, 4
mov eax, dword [esp + 0x14]
mov edx, dword [0x4d9544]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x47723e
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x47723e
mov edx, dword [esp + 0x14]
add edx, 0xfffffff4
push edx
call fcn.004c5432
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret 4