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

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x4e3568
push eax
mov dword fs:[0], esp
sub esp, 0xc
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x2c]
mov eax, dword [edi]
push 0x5c
push eax
mov esi, ecx
call fcn.004aec96
add esp, 8
test eax, eax
jne 0x402d78
or ebx, 0xffffffff
jmp 0x402d7e
sub eax, dword [edi]
sar eax, 1
mov ebx, eax
mov eax, dword [edi]
mov eax, dword [eax - 0xc]
sub eax, ebx
dec eax
push eax
lea ecx, [esp + 0x18]
push ecx
mov ecx, edi
call fcn.00401ea0
mov dword [esp + 0x24], 0
call fcn.004c86da
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x2c], eax
push ebx
lea eax, [esp + 0x14]
push eax
mov ecx, edi
mov byte [esp + 0x2c], 1
call fcn.00401f10
mov ecx, dword [esi + 0x20ac]
mov eax, dword [eax]
push ecx
mov ecx, dword [0x51845c]
push eax
push ecx
lea edx, [esp + 0x38]
push edx
mov byte [esp + 0x34], 2
call fcn.004023c0
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
add esp, 0x10
mov byte [esp + 0x24], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402e06
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ebp, dword [esp + 0x14]
push 0x400
lea eax, [esi + 0x70]
push ebp
push eax
call fcn.004af18d
mov ecx, dword [esp + 0x38]
push 0x400
push ecx
lea edx, [esi + 0x872]
push edx
call fcn.004af18d
mov eax, dword [esi + 0x1c]
add esp, 0x18
push 0
push 0x111
push 0x465
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
mov eax, dword [edi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x402ece
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
call ebx
mov dword [esp + 0x10], eax
call fcn.004c86da
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x30], eax
mov edi, dword [edi]
mov eax, dword [0x518464]
push edi
push eax
lea ecx, [esp + 0x38]
push ecx
mov byte [esp + 0x30], 3
call fcn.004023c0
mov edi, dword [esp + 0x3c]
add esp, 0xc
push 0
push 0
push edi
call fcn.004d7335
call ebx
mov ecx, dword [esp + 0x10]
mov ebx, dword [esi + 0x2098]
sub eax, ecx
add ebx, eax
lea eax, [edi - 0x10]
mov dword [esi + 0x2098], ebx
mov byte [esp + 0x24], 1
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x402ff8
test al, 0x10
mov eax, dword [esp + 0x30]
mov eax, dword [eax]
je 0x402f7c
sub eax, 0x10
push eax
call fcn.00401ba0
add eax, 0x10
add esp, 4
mov dword [esp + 0x30], eax
push 0x5c
lea ecx, [esp + 0x34]
mov byte [esp + 0x28], 4
call fcn.004021e0
mov eax, dword [ebp - 0xc]
push eax
push ebp
lea ecx, [esp + 0x38]
call fcn.00402300
mov ebx, dword [esp + 0x30]
push ecx
add ebx, 0xfffffff0
mov dword [esp + 0x1c], esp
mov dword [esp + 0x14], esp
push ebx
call fcn.00401ba0
mov ecx, dword [esp + 0x18]
add eax, 0x10
mov dword [ecx], eax
mov edi, dword [edi]
mov dword [esp + 0x18], esp
sub edi, 0x10
mov dword [esp + 0x18], esp
push edi
mov byte [esp + 0x30], 5
call fcn.00401ba0
mov edx, dword [esp + 0x1c]
add eax, 0x10
add esp, 4
mov ecx, esi
mov dword [edx], eax
mov byte [esp + 0x2c], 4
call fcn.004026c0
mov byte [esp + 0x24], 1
lea eax, [ebx + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x403002
mov ecx, dword [ebx]
push ebx
jmp 0x402ffd
sub eax, 0x10
push eax
call fcn.00401ba0
add eax, 0x10
add esp, 4
mov dword [esp + 0x30], eax
push 0x5c
lea ecx, [esp + 0x34]
mov byte [esp + 0x28], 6
call fcn.004021e0
mov eax, dword [ebp - 0xc]
push eax
push ebp
lea ecx, [esp + 0x38]
call fcn.00402300
mov ebx, dword [esp + 0x30]
mov eax, dword [edi]
push ebx
push eax
mov ecx, esi
call fcn.00401730
mov edi, dword [edi]
push edi
call fcn.00401600
mov ecx, dword [esi + 0x2090]
mov edi, dword [esi + 0x2094]
add esp, 4
add ecx, eax
adc edi, edx
lea eax, [ebx - 0x10]
mov dword [esi + 0x2090], ecx
mov dword [esi + 0x2094], edi
mov byte [esp + 0x24], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403002
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
mov byte [esp + 0x24], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403025
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
add ebp, 0xfffffff0
mov dword [esp + 0x24], 0xffffffff
lea eax, [ebp + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x403048
mov ecx, dword [ebp]
mov edx, dword [ecx]
push ebp
call dword [edx + 4]
mov ecx, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x18
ret 8