Function at 0x40be50
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x454ef1
mov eax, dword fs:[0]
push eax
sub esp, 0x434
mov eax, dword [0x47f060]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 6
xor eax, eax
push str._start
lea ecx, [ebp - 0x438]
mov dword [ebp - 0x424], 7
mov dword [ebp - 0x428], 0
mov word [ebp - 0x438], ax
call fcn.00406c00
mov dword [ebp - 4], 0
mov eax, dword [0x48277c]
mov esi, dword [sym.imp.MSVCR110.dll_void____cdecl_operator_new_unsigned_int_]
test eax, eax
jne 0x40beef
push 0xe4
call esi
add esp, 4
mov dword [ebp - 0x43c], eax
mov byte [ebp - 4], 1
test eax, eax
je 0x40bee4
mov ecx, eax
call fcn.004122b0
jmp 0x40bee6
xor eax, eax
mov byte [ebp - 4], 0
mov dword [0x48277c], eax
cmp dword [eax + 0x14], 8
jb 0x40bef7
mov eax, dword [eax]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcmpW]
push 0x45ec1c
push eax
call ebx
test eax, eax
je 0x40bf60
mov edi, dword [0x48277c]
test edi, edi
jne 0x40bf42
push 0xe4
call esi
add esp, 4
mov dword [ebp - 0x43c], eax
mov byte [ebp - 4], 2
test eax, eax
je 0x40bf36
mov ecx, eax
call fcn.004122b0
mov edi, eax
jmp 0x40bf38
xor edi, edi
mov byte [ebp - 4], 0
mov dword [0x48277c], edi
push 7
push str.__ptid
lea ecx, [ebp - 0x438]
call fcn.00405270
push 0xffffffffffffffff
push 0
push edi
mov ecx, eax
call fcn.004065d0
mov eax, dword [0x48277c]
test eax, eax
jne 0x40bf95
push 0xe4
call esi
add esp, 4
mov dword [ebp - 0x43c], eax
mov byte [ebp - 4], 3
test eax, eax
je 0x40bf8a
mov ecx, eax
call fcn.004122b0
jmp 0x40bf8c
xor eax, eax
mov byte [ebp - 4], 0
mov dword [0x48277c], eax
add eax, 0x18
cmp dword [eax + 0x14], 8
jb 0x40bfa0
mov eax, dword [eax]
push 0x45ec1c
push eax
call ebx
test eax, eax
je 0x40c006
mov edi, dword [0x48277c]
test edi, edi
jne 0x40bfe5
push 0xe4
call esi
add esp, 4
mov dword [ebp - 0x43c], eax
mov byte [ebp - 4], 4
test eax, eax
je 0x40bfd9
mov ecx, eax
call fcn.004122b0
mov edi, eax
jmp 0x40bfdb
xor edi, edi
mov byte [ebp - 4], 0
mov dword [0x48277c], edi
push 0xa
push str.__disname
lea ecx, [ebp - 0x438]
call fcn.00405270
push 0xffffffffffffffff
push 0
lea ecx, [edi + 0x18]
push ecx
mov ecx, eax
call fcn.004065d0
mov eax, dword [0x48277c]
test eax, eax
jne 0x40c03b
push 0xe4
call esi
add esp, 4
mov dword [ebp - 0x43c], eax
mov byte [ebp - 4], 5
test eax, eax
je 0x40c030
mov ecx, eax
call fcn.004122b0
jmp 0x40c032
xor eax, eax
mov byte [ebp - 4], 0
mov dword [0x48277c], eax
add eax, 0x30
cmp dword [eax + 0x14], 8
jb 0x40c046
mov eax, dword [eax]
push 0x45ec1c
push eax
call ebx
test eax, eax
je 0x40c0ac
mov edi, dword [0x48277c]
test edi, edi
jne 0x40c08b
push 0xe4
call esi
add esp, 4
mov dword [ebp - 0x43c], eax
mov byte [ebp - 4], 6
test eax, eax
je 0x40c07f
mov ecx, eax
call fcn.004122b0
mov edi, eax
jmp 0x40c081
xor edi, edi
mov byte [ebp - 4], 0
mov dword [0x48277c], edi
push 7
push str.__desc
lea ecx, [ebp - 0x438]
call fcn.00405270
push 0xffffffffffffffff
push 0
lea ecx, [edi + 0x30]
push ecx
mov ecx, eax
call fcn.004065d0
mov eax, dword [0x48277c]
test eax, eax
jne 0x40c0e1
push 0xe4
call esi
add esp, 4
mov dword [ebp - 0x43c], eax
mov byte [ebp - 4], 7
test eax, eax
je 0x40c0d6
mov ecx, eax
call fcn.004122b0
jmp 0x40c0d8
xor eax, eax
mov byte [ebp - 4], 0
mov dword [0x48277c], eax
add eax, 0x48
cmp dword [eax + 0x14], 8
jb 0x40c0ec
mov eax, dword [eax]
push 0x45ec1c
push eax
call ebx
test eax, eax
je 0x40c152
mov edi, dword [0x48277c]
test edi, edi
jne 0x40c131
push 0xe4
call esi
add esp, 4
mov dword [ebp - 0x43c], eax
mov byte [ebp - 4], 8
test eax, eax
je 0x40c125
mov ecx, eax
call fcn.004122b0
mov edi, eax
jmp 0x40c127
xor edi, edi
mov byte [ebp - 4], 0
mov dword [0x48277c], edi
push 0xa
push str.__channel
lea ecx, [ebp - 0x438]
call fcn.00405270
push 0xffffffffffffffff
push 0
lea ecx, [edi + 0x48]
push ecx
mov ecx, eax
call fcn.004065d0
mov cl, 1
call fcn.00409d10
test al, al
je 0x40c1fe
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x420], ax
lea eax, [ebp - 0x41e]
push eax
call sub.MSVCR110.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x420]
call fcn.0040b7f0
mov eax, dword [0x48277c]
test eax, eax
jne 0x40c1bf
push 0xe4
call esi
add esp, 4
mov dword [ebp - 0x43c], eax
mov byte [ebp - 4], 9
test eax, eax
je 0x40c1b4
mov ecx, eax
call fcn.004122b0
jmp 0x40c1b6
xor eax, eax
mov byte [ebp - 4], 0
mov dword [0x48277c], eax
cmp word [ebp - 0x420], 0
lea edx, [eax + 0x90]
jne 0x40c1d3
xor ecx, ecx
jmp 0x40c1ef
lea ecx, [ebp - 0x420]
lea edi, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40c1e0
sub ecx, edi
sar ecx, 1
push ecx
lea eax, [ebp - 0x420]
push eax
mov ecx, edx
call fcn.00406c00
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x218], ax
lea eax, [ebp - 0x216]
push eax
call sub.MSVCR110.dll_memset
mov eax, dword [0x48277c]
add esp, 0xc
test eax, eax
jne 0x40c24d
push 0xe4
call esi
add esp, 4
mov dword [ebp - 0x43c], eax
mov byte [ebp - 4], 0xa
test eax, eax
je 0x40c246
mov ecx, eax
call fcn.004122b0
jmp 0x40c248
xor eax, eax
mov dword [0x48277c], eax
add eax, 0x90
cmp dword [eax + 0x14], 8
jb 0x40c25a
mov eax, dword [eax]
push 0x45f1b8
push eax
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40c334
cmp dword [ebp - 0x424], 8
mov eax, dword [0x482720]
lea esi, [ebp - 0x438]
cmovae esi, dword [ebp - 0x438]
test al, 1
jne 0x40c2b4
or eax, 1
push 0x45aeb0
mov dword [0x482720], eax
call fcn.004521b7
add esp, 4
push 0
push 1
push esi
lea eax, [ebp - 0x218]
push eax
call fcn.00443c20
mov eax, dword [0x482720]
test al, 1
jne 0x40c2e3
or eax, 1
push 0x45aeb0
mov dword [0x482720], eax
call fcn.004521b7
add esp, 4
push ecx
call fcn.00443d60
test al, al
jne 0x40c330
cmp dword [ebp - 0x424], 8
mov eax, dword [0x482720]
lea esi, [ebp - 0x438]
cmovae esi, dword [ebp - 0x438]
test al, 1
jne 0x40c31f
or eax, 1
push 0x45aeb0
mov dword [0x482720], eax
call fcn.004521b7
add esp, 4
push 0
push 1
push esi
lea eax, [ebp - 0x218]
push eax
call fcn.00443c20
mov bl, 1
jmp 0x40c336
xor bl, bl
cmp dword [ebp - 0x424], 8
jb 0x40c34e
push dword [ebp - 0x438]
call dword [sym.imp.MSVCR110.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00452076
mov esp, ebp
pop ebp
ret