Function at 0x451060
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x47c
mov eax, dword [ebp + 8]
mov al, byte [eax + 1]
push ebx
mov cl, 1
cmp cl, al
push esi
sbb esi, esi
mov dl, 2
cmp dl, al
push edi
sbb edi, edi
and edi, dword [0x4aa180]
mov ecx, 3
cmp cl, al
sbb ebx, ebx
and ebx, dword [0x4aa184]
mov dl, 4
cmp dl, al
sbb ecx, ecx
and ecx, dword [0x4aa188]
mov edx, 5
cmp dl, al
sbb edx, edx
and edx, dword [0x4aa18c]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x20], edx
mov edx, 6
cmp dl, al
sbb edx, edx
and edx, dword [0x4aa190]
mov dword [esp + 0x18], edx
mov dl, 7
cmp dl, al
sbb eax, eax
and eax, dword [0x4aa194]
and esi, dword [0x4aa17c]
mov dword [esp + 0x1c], eax
je 0x4510ef
mov ecx, esi
call fcn.00412bb0
mov ecx, dword [esp + 0x14]
test edi, edi
je 0x4510fe
mov ecx, edi
call fcn.00412bb0
mov ecx, dword [esp + 0x14]
test ebx, ebx
je 0x45110d
mov ecx, ebx
call fcn.00412bb0
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x451116
call fcn.00412bb0
mov ecx, dword [esp + 0x20]
test ecx, ecx
je 0x451123
call fcn.00412bb0
mov ecx, dword [esp + 0x18]
test ecx, ecx
je 0x451130
call fcn.00412bb0
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x45113d
call fcn.00412bb0
mov eax, dword [ebp + 0xc]
push 0x2a
push eax
mov byte [esp + 0x17], 0
call fcn.004861d1
add esp, 8
test eax, eax
jne 0x45117a
mov ecx, dword [ebp + 0xc]
push 0x3f
push ecx
call fcn.004861d1
add esp, 8
test eax, eax
jne 0x45117a
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x45119c
jmp 0x45139f
mov ecx, dword [ebp + 0xc]
lea eax, [esp + 0x138]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
je 0x45139f
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
lea edx, [esp + 0x10]
push edx
push 0x496780
push 1
push 0
push 0x496790
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
js 0x451392
mov eax, dword [esp + 0x10]
mov ecx, dword [eax]
lea edx, [esp + 0x24]
push edx
push 0x4967a0
push eax
mov eax, dword [ecx]
call eax
test eax, eax
js 0x451386
mov edx, dword [ebp + 0xc]
push 0x105
lea ecx, [esp + 0x27c]
push ecx
push 0xffffffffffffffff
push edx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov eax, dword [esp + 0x24]
mov ecx, dword [eax]
push 0
lea edx, [esp + 0x27c]
push edx
push eax
mov eax, dword [ecx + 0x14]
call eax
test eax, eax
js 0x45137a
test esi, esi
je 0x45124c
mov eax, dword [esp + 0x10]
mov ecx, dword [eax]
push 2
push 0
push 0x104
lea edx, [esp + 0x3c]
push edx
push eax
mov eax, dword [ecx + 0xc]
call eax
push 1
push 0
push 0xffffffffffffffff
lea ecx, [esp + 0x3c]
push ecx
push esi
call fcn.004750c0
test edi, edi
je 0x451277
mov eax, dword [esp + 0x10]
mov edx, dword [eax]
mov edx, dword [edx + 0x20]
push 0x104
lea ecx, [esp + 0x34]
push ecx
push eax
call edx
push 1
push 0
push 0xffffffffffffffff
lea eax, [esp + 0x3c]
push eax
push edi
call fcn.004750c0
test ebx, ebx
je 0x4512a2
mov eax, dword [esp + 0x10]
mov ecx, dword [eax]
push 0x104
lea edx, [esp + 0x34]
push edx
push eax
mov eax, dword [ecx + 0x28]
call eax
push 1
push 0
push 0xffffffffffffffff
lea ecx, [esp + 0x3c]
push ecx
push ebx
call fcn.004750c0
mov esi, dword [esp + 0x14]
test esi, esi
je 0x4512d1
mov eax, dword [esp + 0x10]
mov edx, dword [eax]
mov edx, dword [edx + 0x18]
push 0x104
lea ecx, [esp + 0x34]
push ecx
push eax
call edx
push 1
push 0
push 0xffffffffffffffff
lea eax, [esp + 0x3c]
push eax
push esi
call fcn.004750c0
mov esi, dword [esp + 0x20]
mov edi, dword [esp + 0x18]
test esi, esi
jne 0x4512e1
test edi, edi
je 0x451336
mov eax, dword [esp + 0x10]
mov ecx, dword [eax]
lea edx, [esp + 0x2c]
push edx
push 0x104
lea edx, [esp + 0x38]
push edx
push eax
mov eax, dword [ecx + 0x40]
call eax
test esi, esi
je 0x451311
push 1
push 0
push 0xffffffffffffffff
lea ecx, [esp + 0x3c]
push ecx
push esi
call fcn.004750c0
test edi, edi
je 0x451336
cmp byte [esp + 0x30], 0
je 0x45132f
mov eax, dword [esp + 0x2c]
inc eax
cdq
push 0x18
push edx
push eax
mov eax, edi
call fcn.004010d0
jmp 0x451336
mov ecx, edi
call fcn.00412bb0
mov esi, dword [esp + 0x1c]
test esi, esi
je 0x45135f
mov eax, dword [esp + 0x10]
mov edx, dword [eax]
mov edx, dword [edx + 0x38]
lea ecx, [esp + 0x28]
push ecx
push eax
call edx
mov eax, dword [esp + 0x28]
cdq
push 0x18
push edx
push eax
mov eax, esi
call fcn.004010d0
mov eax, dword [0x4aaa2c]
push 1
push 0
push 0xffffffffffffffff
push 0x4988a4
push eax
call fcn.004750c0
mov byte [esp + 0xf], 1
mov eax, dword [esp + 0x24]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [esp + 0x10]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
call dword [sym.imp.ole32.dll_CoUninitialize]
cmp byte [esp + 0xf], 0
jne 0x4513ea
mov eax, dword [0x4a6920]
cmp byte [eax + 0xe8], 0
jne 0x4513cd
mov ecx, dword [0x4aaa2c]
push 1
push 0
push 0xffffffffffffffff
push 0x499f08
push ecx
call fcn.004750c0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [ebp + 8]
push 0x498819
push 0
push 0x499f08
call fcn.0042d220
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret 8