Function at 0x10004330
Capabilities:
Check if file exists

Disassembly:
push 0xffffffffffffffff
push 0x1005adb8
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x1006e020]
xor eax, esp
push eax
lea eax, [esp + 0x40]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x50]
mov eax, dword [ebp + 0x4c]
cmp dword [eax - 8], 0
lea esi, [ebp + 0x4c]
je 0x10004962
mov edi, dword [esp + 0x54]
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x10004411
mov eax, dword [0x1006eb44]
mov dword [esp + 0x50], eax
mov dword [esp + 0x48], 0
push 0x189
lea ecx, [esp + 0x58]
mov dword [esp + 0x58], eax
call fcn.10013a10
mov byte [esp + 0x48], 1
mov esi, dword [esp + 0x54]
push edi
push esi
lea edx, [esp + 0x58]
call fcn.10014ab0
mov edi, dword [esp + 0x58]
mov ecx, dword [ebp + 4]
add esp, 8
push 0x30
push 0
push edi
push ecx
call dword [sym.imp.USER32.dll_MessageBoxW]
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
lea edx, [esi - 0xc]
cmp edx, 0x1006eb34
je 0x100043ef
add esi, 0xfffffff4
push esi
call ebx
test eax, eax
jg 0x100043ef
push esi
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
lea eax, [edi - 0xc]
cmp eax, 0x1006eb34
je 0x10004962
lea esi, [edi - 0xc]
push esi
call ebx
test eax, eax
jg 0x10004962
push esi
jmp 0x1000495a
mov ecx, dword [0x1006eb44]
mov dword [esp + 0x14], ecx
lea edx, [esp + 0x14]
push edx
push ebp
mov ecx, esi
mov dword [esp + 0x50], 2
call fcn.10006bb0
mov eax, dword [ebp + 0x78]
mov ecx, dword [eax - 8]
lea edx, [esp + 0x50]
push edx
lea ebx, [esp + 0x18]
call fcn.10015a20
mov eax, dword [eax]
mov ecx, dword [ebp + 0x78]
push eax
push ecx
call dword [sym.imp.MSVCR80.dll__wcsicmp]
mov eax, dword [esp + 0x58]
lea ecx, [eax - 0xc]
add esp, 8
cmp ecx, 0x1006eb34
je 0x10004481
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x10004481
mov eax, dword [esp + 0x50]
add eax, 0xfffffff4
push eax
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
lea ecx, [esp + 0x14]
lea eax, [esp + 0x50]
call fcn.10015820
mov byte [esp + 0x48], 3
mov edx, dword [esp + 0x54]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
mov ebx, eax
lea esi, [esp + 0x18]
call fcn.10015b70
mov byte [esp + 0x48], 4
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x50]
mov eax, dword [eax - 8]
mov ecx, dword [edx - 8]
push edx
lea ecx, [ecx + eax + 2]
lea ebx, [esp + 0x54]
call fcn.10015350
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
mov edi, ebx
call fcn.10011c20
mov esi, dword [esp + 0x50]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov dword [esi - 8], eax
mov word [esi + eax*2], 0
lea ecx, [esp + 0x28]
lea esi, [ebp + 0x34]
push ecx
lea eax, [esp + 0x18]
call fcn.10008b30
mov edi, dword [esp + 0x28]
test edi, edi
mov ebx, dword [esi + 4]
je 0x1000450c
cmp edi, esi
je 0x10004512
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov esi, dword [esp + 0x2c]
cmp esi, ebx
je 0x100047aa
test edi, edi
jne 0x10004528
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
cmp esi, dword [edi + 4]
jne 0x10004533
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov ecx, dword [esi + 0x10]
xor eax, eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
lea eax, [esp + 0x30]
mov byte [esp + 0x48], 5
call fcn.10001d30
mov edx, dword [0x1006eb44]
mov dword [esp + 0x1c], edx
mov byte [esp + 0x48], 6
xor esi, esi
mov ecx, dword [esp + 0x34]
test ecx, ecx
mov dword [esp + 0x20], esi
je 0x10004773
mov eax, dword [esp + 0x38]
sub eax, ecx
sar eax, 2
cmp esi, eax
jae 0x10004773
mov eax, ecx
mov edi, dword [eax + esi*4]
mov ecx, dword [edi + 8]
cmp dword [ecx - 8], 0
je 0x10004611
lea ecx, [esp + 0x24]
mov eax, edi
call fcn.10001650
mov byte [esp + 0x48], 7
mov eax, dword [eax]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
mov esi, eax
test esi, esi
je 0x100045b8
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push esi
mov ebx, eax
lea esi, [esp + 0x20]
call fcn.100158a0
mov byte [esp + 0x48], 6
mov eax, dword [esp + 0x24]
lea edx, [eax - 0xc]
cmp edx, 0x1006eb34
je 0x100045f6
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x100045f6
mov eax, dword [esp + 0x24]
add eax, 0xfffffff4
push eax
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
push eax
push ecx
call dword [sym.imp.MSVCR80.dll__wcsicmp]
add esp, 8
test eax, eax
je 0x10004619
mov esi, dword [esp + 0x20]
add esi, 1
jmp 0x10004563
lea ecx, [esp + 0x24]
mov eax, edi
call fcn.10001650
mov esi, dword [esp + 0x54]
mov eax, dword [eax]
push esi
push eax
call dword [sym.imp.MSVCR80.dll__wcsicoll]
add esp, 8
test eax, eax
mov eax, dword [esp + 0x24]
lea edx, [eax - 0xc]
sete bl
cmp edx, 0x1006eb34
je 0x10004667
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x10004667
mov eax, dword [esp + 0x24]
add eax, 0xfffffff4
push eax
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
test bl, bl
je 0x1000469f
lea esi, [esp + 0x1c]
call fcn.10015b40
lea esi, [esp + 0x30]
call fcn.100144e0
lea esi, [esp + 0x18]
call fcn.10015b40
lea esi, [esp + 0x50]
call fcn.10015b40
lea esi, [esp + 0x14]
call fcn.10015b40
mov al, 1
jmp 0x10004964
mov eax, dword [0x1006eb44]
push 0x18b
lea ecx, [esp + 0x28]
mov dword [esp + 0x28], eax
call fcn.10013a10
mov ecx, dword [0x1006eb44]
mov dword [esp + 0x20], ecx
mov bl, 9
lea ecx, [esp + 0x28]
mov eax, edi
mov byte [esp + 0x48], bl
call fcn.10001650
mov byte [esp + 0x48], 0xa
mov eax, dword [eax]
mov edx, dword [esp + 0x18]
push esi
push eax
mov eax, dword [esp + 0x2c]
push edx
push eax
lea ecx, [esp + 0x30]
push ecx
call fcn.10014910
add esp, 0x14
lea esi, [esp + 0x28]
mov byte [esp + 0x48], bl
call fcn.10015b40
mov edx, dword [esp + 0x20]
mov eax, dword [ebp + 4]
push 0x34
push 0
push edx
push eax
call dword [sym.imp.USER32.dll_MessageBoxW]
cmp eax, 6
je 0x1000475a
lea esi, [esp + 0x20]
call fcn.10015b40
lea esi, [esp + 0x24]
call fcn.10015b40
lea esi, [esp + 0x1c]
call fcn.10015b40
lea esi, [esp + 0x30]
call fcn.100144e0
lea esi, [esp + 0x18]
call fcn.10015b40
lea esi, [esp + 0x50]
call fcn.10015b40
lea esi, [esp + 0x14]
call fcn.10015b40
jmp 0x10004962
push edi
push ebp
call fcn.10005d60
lea esi, [esp + 0x20]
call fcn.10015b40
lea esi, [esp + 0x24]
call fcn.10015b40
mov esi, dword [esp + 0x1c]
lea ecx, [esi - 0xc]
cmp ecx, 0x1006eb34
je 0x10004799
add esi, 0xfffffff4
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x10004799
push esi
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
mov eax, dword [esp + 0x34]
test eax, eax
je 0x100047aa
push eax
call sub.MSVCR80.dll_void___cdecl_operator_delete_void__
add esp, 4
mov edx, dword [0x1006eb44]
mov dword [esp + 0x24], edx
mov byte [esp + 0x48], 0xb
mov eax, dword [ebp + 0x4c]
push eax
mov eax, dword [esp + 0x58]
push eax
lea ecx, [ebp + 0x2c]
push ecx
lea ecx, [esp + 0x30]
call fcn.100163f0
test al, al
mov ebx, dword [esp + 0x24]
je 0x100048d8
cmp dword [ebx - 8], 0
je 0x100048d8
lea edx, [esp + 0x24]
push edx
mov ecx, 0x10070c58
call fcn.10007f30
lea edi, [esp + 0x50]
call fcn.10015ac0
lea esi, [esp + 0x20]
call fcn.10015b70
mov byte [esp + 0x48], 0xc
mov eax, dword [esp + 0x54]
push eax
push 1
mov ecx, esi
push ecx
mov edx, edi
push edx
mov ecx, ebp
call fcn.10005980
mov edi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
mov byte [esp + 0x54], al
mov eax, dword [esp + 0x20]
lea ecx, [eax - 0xc]
cmp ecx, 0x1006eb34
je 0x1000484b
lea esi, [eax - 0xc]
push esi
call edi
test eax, eax
jg 0x1000484b
push esi
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
lea edx, [ebx - 0xc]
cmp edx, 0x1006eb34
je 0x10004869
add ebx, 0xfffffff4
push ebx
call edi
test eax, eax
jg 0x10004869
push ebx
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
mov eax, dword [esp + 0x18]
lea ecx, [eax - 0xc]
cmp ecx, 0x1006eb34
je 0x1000488b
lea esi, [eax - 0xc]
push esi
call edi
test eax, eax
jg 0x1000488b
push esi
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
mov eax, dword [esp + 0x50]
lea edx, [eax - 0xc]
cmp edx, 0x1006eb34
je 0x100048ad
lea esi, [eax - 0xc]
push esi
call edi
test eax, eax
jg 0x100048ad
push esi
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
mov eax, dword [esp + 0x14]
lea ecx, [eax - 0xc]
cmp ecx, 0x1006eb34
je 0x100048cf
lea esi, [eax - 0xc]
push esi
call edi
test eax, eax
jg 0x100048cf
push esi
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
mov al, byte [esp + 0x54]
jmp 0x10004964
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
lea edx, [ebx - 0xc]
cmp edx, 0x1006eb34
je 0x100048fc
add ebx, 0xfffffff4
push ebx
call esi
test eax, eax
jg 0x100048fc
push ebx
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
mov eax, dword [esp + 0x18]
lea ecx, [eax - 0xc]
cmp ecx, 0x1006eb34
je 0x1000491e
lea edi, [eax - 0xc]
push edi
call esi
test eax, eax
jg 0x1000491e
push edi
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
mov eax, dword [esp + 0x50]
lea edx, [eax - 0xc]
cmp edx, 0x1006eb34
je 0x10004940
lea edi, [eax - 0xc]
push edi
call esi
test eax, eax
jg 0x10004940
push edi
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
mov eax, dword [esp + 0x14]
lea ecx, [eax - 0xc]
cmp ecx, 0x1006eb34
je 0x10004962
lea edi, [eax - 0xc]
push edi
call esi
test eax, eax
jg 0x10004962
push edi
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
xor al, al
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret 8