Function at 0x40d940
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x518a96
mov eax, dword fs:[0]
push eax
sub esp, 0xfc
mov eax, dword [0x55d3e4]
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
mov edi, ecx
mov ebx, dword [ebp + 8]
cmp word [ebx], 0
jne 0x40d97d
xor ecx, ecx
jmp 0x40d991
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40d982
sub ecx, edx
sar ecx, 1
push ecx
push ebx
lea ecx, [edi + 0x64]
call fcn.00407fd0
cmp dword [edi + 0x74], 6
jae 0x40d9b7
push 0
lea esi, [edi + 0x7c]
push 0x5207d8
mov ecx, esi
call fcn.00407fd0
jmp 0x40da40
mov eax, dword [edi + 0x74]
lea ecx, [edi + 0x64]
add eax, 0xfffffffa
push eax
push 0
lea eax, [ebp - 0x88]
push eax
call fcn.0040cc30
mov ecx, eax
lea esi, [edi + 0x7c]
mov dword [ebp - 0x108], ecx
cmp esi, ecx
je 0x40da1e
mov eax, dword [esi + 0x14]
cmp eax, 8
jb 0x40d9f7
inc eax
mov ecx, esi
push eax
push dword [esi]
call fcn.0047f630
mov ecx, dword [ebp - 0x108]
mov dword [esi + 0x14], 7
cmp dword [esi + 0x14], 8
mov dword [esi + 0x10], 0
jb 0x40da0f
mov eax, dword [esi]
jmp 0x40da11
mov eax, esi
xor edx, edx
push ecx
mov ecx, esi
mov word [eax], dx
call fcn.0040c2c0
mov eax, dword [ebp - 0x74]
mov dword [ebp - 4], 0xffffffff
cmp eax, 8
jb 0x40da40
inc eax
lea ecx, [ebp - 0x88]
push eax
push dword [ebp - 0x88]
call fcn.0047f630
xor eax, eax
mov dword [ebp - 0x44], 7
push 0xffffffffffffffff
push eax
push esi
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x48], 0
mov word [ebp - 0x58], ax
call fcn.00407eb0
push 1
push 0x52103c
lea ecx, [ebp - 0x58]
mov dword [ebp - 4], 1
call fcn.0040a6a0
push 0xa
push 0x5207b0
lea ecx, [ebp - 0x58]
call fcn.0040a6a0
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x70]
push eax
call fcn.0042135e
sub esp, 0x10
mov byte [ebp - 4], 2
mov ecx, esp
mov dword [ecx + 0x14], 0xf
mov dword [ecx + 0x10], 0
cmp dword [ecx + 0x14], 0x10
jb 0x40dab3
mov eax, dword [ecx]
jmp 0x40dab5
mov eax, ecx
push 0xffffffffffffffff
mov byte [eax], 0
lea eax, [ebp - 0x70]
push 0
push eax
call fcn.00407c80
lea eax, [ebp - 0x40]
push eax
call fcn.0042089c
cmp dword [ebp - 0x2c], 8
lea eax, [ebp - 0x40]
push 0x20
cmovae eax, dword [ebp - 0x40]
push 0x521040
push dword [ebp - 0x30]
mov byte [ebp - 4], 3
push eax
call fcn.0040c690
add esp, 0x2c
lea ecx, [edi + 0x94]
mov esi, eax
mov dword [ebp - 0x108], esi
push ebx
call fcn.00424bec
test esi, esi
mov esi, dword [ebp + 0xc]
je 0x40db1a
test esi, esi
jne 0x40db1a
mov ecx, edi
call fcn.0040d4e0
test eax, eax
je 0x40db21
mov ecx, edi
call fcn.0040d0c0
cmp dword [edi + 0xe4], 0
jne 0x40db3b
cmp dword [ebp - 0x108], 0
je 0x40db3b
test esi, esi
je 0x40dc56
lea ecx, [ebp - 0x104]
call fcn.0040f750
lea ecx, [ebp - 0x104]
mov byte [ebp - 4], 4
call fcn.004105d0
mov eax, dword [0x55fa68]
test eax, eax
jne 0x40db8d
push 0x114
call fcn.004974ac
add esp, 4
mov dword [ebp - 0x108], eax
mov byte [ebp - 4], 5
test eax, eax
je 0x40db82
mov ecx, eax
call fcn.00411bd0
jmp 0x40db84
xor eax, eax
mov byte [ebp - 4], 4
mov dword [0x55fa68], eax
push 0x5207d8
push str.63fd8
push str.OvIImgSet
lea ecx, [ebp - 0x28]
push ecx
mov ecx, eax
call fcn.0041972a
cmp dword [ebp - 0x18], 0
mov byte [ebp - 4], 6
je 0x40dc22
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40dc22
push 1
push 0xffffffffffffffff
lea eax, [ebp - 0x108]
mov dword [ebp - 0x108], 0x5c
push eax
lea ecx, [ebp - 0x28]
call fcn.0040cb70
test eax, eax
jle 0x40dc22
push eax
push 0
lea eax, [ebp - 0xa0]
push eax
lea ecx, [ebp - 0x28]
call fcn.0040cc30
push eax
lea ecx, [ebp - 0x28]
call fcn.0040b170
lea ecx, [ebp - 0xa0]
call fcn.00413c30
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
call fcn.00423be2
add esp, 4
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x40dc37
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.0047f630
xor eax, eax
mov dword [ebp - 0x14], 7
lea ecx, [ebp - 0x104]
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
call fcn.0040f820
mov eax, dword [ebp - 0x2c]
cmp eax, 8
jb 0x40dc6b
inc eax
lea ecx, [ebp - 0x40]
push eax
push dword [ebp - 0x40]
call fcn.0047f630
xor eax, eax
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x30], 0
cmp eax, 0x10
jb 0x40dc94
inc eax
lea ecx, [ebp - 0x70]
push eax
push dword [ebp - 0x70]
call fcn.004080d0
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x5c], 0xf
mov dword [ebp - 0x60], 0
mov byte [ebp - 0x70], 0
cmp eax, 8
jb 0x40dcbb
inc eax
lea ecx, [ebp - 0x58]
push eax
push dword [ebp - 0x58]
call fcn.0047f630
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.004974f6
mov esp, ebp
pop ebp
ret 8