Function at 0x40ea86
Capabilities:
Check if file exists

Disassembly:
mov eax, 0x45f453
call fcn.0045e340
sub esp, 0x94
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, ecx
push edi
lea ecx, [ebp - 0x5c]
mov byte [eax], 1
call fcn.00405416
lea ecx, [ebp - 0x34]
call fcn.004022d0
mov edi, dword [ebp + 8]
xor ebx, ebx
push ebx
lea ecx, [ebp - 0x5c]
mov eax, dword [edi]
mov dword [ebp - 4], ebx
push eax
call fcn.00405898
test al, al
je 0x40ecf5
mov eax, dword [esi + 0x64]
cmp eax, 2
je 0x40ece3
cmp eax, ebx
jne 0x40ebca
mov ecx, edi
call fcn.00402806
inc eax
mov ecx, edi
push eax
lea eax, [ebp - 0x68]
push eax
call fcn.0040ed97
lea ecx, [ebp - 0x34]
mov edx, eax
push ecx
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 1
call fcn.00402238
push dword [ebp - 0x68]
mov byte [ebp - 4], 3
call fcn.00402b73
pop ecx
lea edx, [ebp + 8]
push edx
mov dl, byte [esi + 0x118]
neg dl
lea ebx, [esi + 0x110]
mov eax, dword [ebp - 0x44]
sbb edx, edx
mov dword [ebp - 0x14], eax
and edx, ebx
lea ebx, [esi + 0xf0]
push edx
mov dl, byte [esi + 0xfb]
neg dl
sbb edx, edx
mov eax, dword [ebp - 0x40]
and edx, ebx
mov dword [ebp - 0x10], eax
push edx
mov eax, dword [esi + 0x34]
push dword [esi + 0x78]
lea edx, [ebp - 0x5c]
mov ecx, dword [eax]
push edx
lea edx, [ebp - 0x14]
push edx
push dword [ebp - 0x24]
push eax
call dword [ecx + 0x14]
xor ebx, ebx
cmp eax, ebx
je 0x40eb6b
mov esi, eax
jmp 0x40eb86
mov eax, dword [ebp + 8]
sub eax, ebx
je 0x40ebbe
dec eax
je 0x40ebb7
dec eax
je 0x40ebb3
dec eax
je 0x40ebac
dec eax
je 0x40eba3
dec eax
je 0x40eb9c
mov esi, 0x80004005
push dword [ebp - 0x24]
call fcn.00402b73
push dword [ebp - 0x34]
call fcn.00402b73
pop ecx
jmp 0x40eced
mov esi, 0x80004004
jmp 0x40eb86
mov dword [esi + 0x64], 3
jmp 0x40ebbe
mov dword [esi + 0x64], 2
xor esi, esi
jmp 0x40eb86
mov dword [esi + 0x64], 1
push dword [ebp - 0x24]
mov byte [ebp - 4], bl
call fcn.00402b73
pop ecx
mov eax, dword [esi + 0x64]
cmp eax, 3
jne 0x40ec0c
mov ecx, edi
call fcn.0040ad59
test al, al
jne 0x40ec00
push edi
mov ecx, esi
push dword [0x468948]
call fcn.0040df27
cmp eax, ebx
je 0x40ebf6
mov esi, eax
jmp 0x40ece5
mov esi, 0x80004005
jmp 0x40ece5
mov byte [esi + 0x208], 1
jmp 0x40ed76
cmp eax, 4
jne 0x40ec80
push edi
lea ecx, [ebp - 0x18]
call fcn.00402407
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 4
call fcn.0040ad59
test al, al
jne 0x40ec3a
push edi
mov ecx, esi
push dword [0x468948]
call fcn.0040df27
jmp 0x40ec60
mov ecx, dword [edi]
mov edx, dword [ebp - 0x18]
call fcn.00404969
test al, al
jne 0x40ec73
call fcn.00406258
lea ecx, [ebp - 0x18]
push edi
push ecx
mov ecx, esi
push dword [0x46894c]
push eax
call fcn.0040e02a
cmp eax, ebx
mov esi, eax
jne 0x40ec6b
mov esi, 0x80004005
push dword [ebp - 0x18]
jmp 0x40eb89
push dword [ebp - 0x18]
call fcn.00402b73
jmp 0x40ed75
mov eax, dword [ebp - 0x3c]
mov ecx, dword [edi]
shr eax, 4
test al, 1
je 0x40eca2
call fcn.004048e7
test al, al
jne 0x40ed76
push edi
push dword [0x468954]
jmp 0x40ecd4
call fcn.00405e6e
test al, al
je 0x40ed76
mov ecx, dword [edi]
call fcn.00404e46
test al, al
jne 0x40ed76
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x40ed76
push edi
push dword [0x468950]
mov ecx, esi
call fcn.0040df94
cmp eax, ebx
jne 0x40ebef
xor esi, esi
push dword [ebp - 0x34]
call fcn.00402b73
pop ecx
mov eax, esi
jmp 0x40ed86
mov ecx, dword [edi]
call fcn.004077b2
mov esi, eax
cmp esi, ebx
jl 0x40ed76
mov eax, dword [edi]
cmp word [eax + esi*2 + 2], bx
je 0x40ed76
push edi
lea ecx, [ebp - 0x18]
call fcn.00402407
cmp esi, dword [ebp - 0x14]
mov byte [ebp - 4], 5
jae 0x40ed27
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x14], esi
mov word [eax + esi*2], bx
lea ecx, [ebp - 0xa0]
call fcn.00405416
lea ecx, [ebp - 0x78]
call fcn.004022d0
push ebx
lea ecx, [ebp - 0xa0]
push dword [ebp - 0x18]
mov byte [ebp - 4], 6
call fcn.00405898
test al, al
je 0x40ed64
mov edx, dword [ebp - 0x80]
test dl, 1
je 0x40ed64
mov ecx, dword [ebp - 0x18]
and edx, 0xfffffffe
call fcn.00404846
push dword [ebp - 0x78]
call fcn.00402b73
push dword [ebp - 0x18]
call fcn.00402b73
pop ecx
pop ecx
mov eax, dword [ebp + 0xc]
push dword [ebp - 0x34]
mov byte [eax], bl
call fcn.00402b73
pop ecx
xor eax, eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 8