Function at 0x40cb40
Capabilities:
Check if file exists

Disassembly:
push 0xffffffffffffffff
push 0x4d0b7a
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push esi
mov eax, dword [0x50397c]
xor eax, esp
push eax
lea eax, [esp + 0x30]
mov dword fs:[0], eax
lea ebx, [esp + 0x20]
mov dword [esp + 0x14], 0
call fcn.00428ed0
lea eax, [esp + 0x1c]
push eax
mov dword [esp + 0x3c], 0
call fcn.004291c0
add esp, 4
lea esi, [esp + 0x18]
mov byte [esp + 0x38], 1
call fcn.0042f480
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x30]
push edx
mov ebx, str.handinput.dat
mov byte [esp + 0x40], 2
call fcn.004065b0
add esp, 8
mov byte [esp + 0x38], 3
mov eax, dword [eax]
mov esi, dword [0x4d5364]
mov ebx, 1
push eax
mov dword [esp + 0x18], ebx
call esi
test eax, eax
jne 0x40cc2d
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x2c]
push ecx
mov ebx, str.handinput.dat
call fcn.004065b0
add esp, 8
mov dword [esp + 0x38], 4
mov eax, dword [eax]
mov ebx, 3
push eax
mov dword [esp + 0x18], ebx
call esi
test eax, eax
jne 0x40cc2d
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x28]
push eax
mov ebx, str.handinput.dat
call fcn.004065b0
mov eax, dword [eax]
add esp, 8
push eax
mov ebx, 7
call esi
test eax, eax
mov byte [esp + 0x13], 0
je 0x40cc32
mov byte [esp + 0x13], 1
test bl, 4
je 0x40cc5e
mov eax, dword [esp + 0x24]
and ebx, 0xfffffffb
add eax, 0xfffffff0
mov dword [esp + 0x14], ebx
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40cc5e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, 2
mov dword [esp + 0x38], 3
je 0x40cc92
mov eax, dword [esp + 0x28]
and ebx, 0xfffffffd
add eax, 0xfffffff0
mov dword [esp + 0x14], ebx
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40cc92
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, 1
mov dword [esp + 0x38], 2
je 0x40ccbf
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ccbf
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp byte [esp + 0x13], 0
je 0x40cd5b
push 1
push edi
call fcn.0040ca60
mov ecx, dword [edi + 0x28]
test ecx, ecx
je 0x40cce2
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push 0
call eax
push edi
call fcn.0040d9a0
mov dword [edi + 0x848], eax
call fcn.0041cf40
mov ecx, dword [0x50de50]
cmp dword [ecx + 0xce0], 0
mov eax, dword [edi + 0x2c]
mov dword [0x50de4c], 1
je 0x40cd2b
test eax, eax
je 0x40cd45
mov edx, dword [eax + 4]
push edx
call dword [0x4d53d0]
test eax, eax
je 0x40cd45
mov esi, dword [edi + 0x2c]
call fcn.00405f00
jmp 0x40cd45
test eax, eax
je 0x40cd45
mov eax, dword [eax + 4]
push eax
call dword [0x4d53d0]
test eax, eax
je 0x40cd45
mov esi, dword [edi + 0x2c]
call fcn.00405f40
push edi
call fcn.0040c500
mov ecx, dword [edi + 4]
push 1
push 0
push ecx
call dword [0x4d53e8]
jmp 0x40cdba
mov esi, dword [edi + 0x2c]
mov edx, dword [esi + 4]
push edx
call dword [0x4d53d0]
test eax, eax
je 0x40cd82
mov eax, dword [esi + 4]
push 0
push 0x3e8
push 0x3e8
push eax
call dword [0x4d5400]
push 0
push edi
call fcn.0040ca60
mov ecx, dword [edi + 0x28]
test ecx, ecx
je 0x40cd9a
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push 0
call eax
mov eax, dword [edi + 0x2c]
test eax, eax
je 0x40ce3e
lea esi, [eax + 0x20]
test esi, esi
je 0x40cdb7
mov edx, dword [esi]
mov eax, dword [edx + 4]
push 1
mov ecx, esi
call eax
mov dword [edi + 0x28], esi
mov byte [esp + 0x38], 1
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40cddf
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x38], 0
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ce04
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x38], 0xffffffff
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ce2c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
add esp, 0x30
ret
xor esi, esi
jmp 0x40cdb7