Function at 0x402700
Capabilities:
Check if file exists

Disassembly:
sub esp, 0xc0
mov eax, dword [0x40701c]
xor eax, esp
mov dword [esp + 0xbc], eax
call fcn.004022a0
test eax, eax
je 0x40273b
call fcn.00402450
test eax, eax
jne 0x40273b
mov ecx, dword [esp + 0xbc]
xor ecx, esp
call fcn.00403c5c
add esp, 0xc0
ret
push ebx
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor ebp, ebp
lea esi, [esp + 0x14]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], ebp
call fcn.004020d0
lea esi, [esp + 0x10]
call fcn.004020d0
push eax
lea eax, [esp + 0x28]
push eax
mov ebx, 0x405504
call fcn.00402dc0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
add esp, 8
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402793
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x24]
push edi
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4029d8
lea ebx, [esp + 0x24]
lea edi, [esp + 0x10]
lea esi, [esp + 0x14]
mov dword [esp + 0x14], ebp
mov dword [esp + 0x10], ebp
mov dword [esp + 0x24], ebp
call fcn.00402210
mov eax, dword [esp + 0x14]
cmp eax, 5
jne 0x4028a3
cmp dword [esp + 0x10], 1
jne 0x4029d8
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x14]
push eax
mov ebx, 0x40551c
call fcn.00402dc0
mov ecx, dword [esp + 0x18]
push ebp
push ecx
call dword [sym.imp.MSVCR80.dll__waccess]
add esp, 0x10
cmp eax, 0xffffffff
je 0x4029b8
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x18]
push eax
mov ebx, 0x405524
call fcn.00402dc0
mov ecx, dword [esp + 0x1c]
add esp, 8
push ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
cmp edi, ebp
je 0x4029af
mov edx, dword [esp + 0x10]
push edx
lea esi, [esp + 0x30]
call fcn.00403070
mov eax, dword [eax]
push eax
lea ecx, [esp + 0xb4]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
mov eax, dword [esp + 0x2c]
lea ecx, [esp + 0x30]
cmp eax, ecx
je 0x402868
push eax
call dword [sym.imp.MSVCR80.dll_free]
add esp, 4
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x40553c
push edi
call esi
cmp eax, ebp
mov ebx, 0x10
je 0x402899
cmp dword [esp + 0xc8], ebx
mov ecx, dword [esp + 0xb4]
jae 0x402896
lea ecx, [esp + 0xb4]
push ecx
call eax
push 0x40554c
jmp 0x402979
cmp eax, 6
jne 0x4029d8
cmp dword [esp + 0x10], 1
jne 0x4029d8
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x14]
push edx
mov ebx, 0x40555c
call fcn.00402dc0
mov eax, dword [esp + 0x18]
push ebp
push eax
call dword [sym.imp.MSVCR80.dll__waccess]
add esp, 0x10
cmp eax, 0xffffffff
je 0x4029b8
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x18]
push edx
mov ebx, 0x405568
call fcn.00402dc0
mov eax, dword [esp + 0x1c]
add esp, 8
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
cmp edi, ebp
je 0x4029af
mov ecx, dword [esp + 0x10]
push ecx
lea esi, [esp + 0x30]
call fcn.00403070
mov edx, dword [eax]
push edx
lea ecx, [esp + 0xb4]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
mov eax, dword [esp + 0x2c]
lea ecx, [esp + 0x30]
cmp eax, ecx
je 0x402943
push eax
call dword [sym.imp.MSVCR80.dll_free]
add esp, 4
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x405580
push edi
call esi
cmp eax, ebp
mov ebx, 0x10
je 0x402974
cmp dword [esp + 0xc8], ebx
mov ecx, dword [esp + 0xb4]
jae 0x402971
lea ecx, [esp + 0xb4]
push ecx
call eax
push 0x405590
push edi
call esi
cmp eax, ebp
je 0x4029a2
cmp dword [esp + 0xc8], ebx
mov ecx, dword [esp + 0xb4]
mov dword [esp + 0x1c], 1
jae 0x40299f
lea ecx, [esp + 0xb4]
push ecx
call eax
lea ecx, [esp + 0xb0]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea eax, [esp + 0x14]
call fcn.00402cd0
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
or ecx, 0xffffffff
lea edx, [eax + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4029d8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call esi
sub eax, dword [esp + 0x20]
mov dword [esp + 0x24], eax
call esi
lea ecx, [esp + 0x10]
push ecx
mov ecx, 0x405374
mov ebp, eax
call fcn.00402c20
mov eax, dword [esp + 0x10]
mov ecx, dword [eax - 8]
mov edx, 1
sub edx, dword [eax - 4]
sub ecx, 0x104
or edx, ecx
jge 0x402a26
mov ecx, 0x104
lea eax, [esp + 0x10]
call fcn.004032e0
mov eax, dword [esp + 0x10]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov edx, dword [esp + 0x10]
test edx, edx
jne 0x402a40
xor eax, eax
jmp 0x402a5a
mov eax, edx
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x402a45
sub eax, esi
sar eax, 1
js 0x402be5
cmp eax, dword [edx - 8]
jg 0x402be5
mov dword [edx - 0xc], eax
mov edx, dword [esp + 0x10]
mov word [edx + eax*2], 0
mov eax, dword [esp + 0x10]
push 0x5c
push eax
call dword [sym.imp.MSVCR80.dll_wcsrchr]
add esp, 8
test eax, eax
jne 0x402a89
or eax, 0xffffffff
jmp 0x402a8f
sub eax, dword [esp + 0x10]
sar eax, 1
add eax, 1
lea ecx, [esp + 0x20]
lea edx, [esp + 0x10]
call fcn.00402d50
mov ecx, dword [eax]
mov esi, dword [esp + 0x10]
lea eax, [ecx - 0x10]
add esi, 0xfffffff0
cmp eax, esi
je 0x402af1
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x402ae4
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x402ae4
call fcn.00403330
mov ebx, eax
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x402adb
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
add ebx, 0x10
mov dword [esp + 0x10], ebx
jmp 0x402af1
mov ebx, dword [ecx - 0xc]
push ecx
lea eax, [esp + 0x14]
call fcn.00403240
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 0x402b11
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x10]
push ecx
call fcn.004016e0
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
add esp, 4
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x402b3e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call edi
mov esi, eax
sub esi, ebp
call edi
push 0x4055a4
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
call edi
mov edi, eax
sub edi, ebp
test ebx, ebx
je 0x402b8a
push 0x4055bc
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x402b83
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x1c]
push esi
push edi
push ecx
push edx
call eax
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402baa
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
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 0x402bca
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0xcc]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
xor eax, eax
call fcn.00403c5c
add esp, 0xc0
ret
push 0x80070057
call fcn.00401000
int3