Function at 0x47bef0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5e3963
mov eax, dword fs:[0]
push eax
sub esp, 0xc8
mov eax, dword [0x66c0e0]
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 ebx, dword [ebp + 0x18]
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
push ebx
mov dword [ebp - 0x48], edi
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x44], ebx
call fcn.0041abc0
mov esi, eax
movzx eax, bl
xor ebx, ebx
shr eax, 4
add esp, 4
mov dword [ebp - 0x38], eax
cmp eax, ebx
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x40], esi
mov byte [ebp - 0x21], bl
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], ebx
jne 0x47bf68
add eax, 7
cdq
and edx, 7
add eax, edx
sar eax, 3
mov ecx, dword [ebp + 0x14]
imul ecx, eax
mov dword [ebp - 0x34], ecx
imul ecx, esi
mov esi, dword [ebp + 0x1c]
xor eax, eax
cmp esi, 1
setne al
mov dword [ebp - 0x3c], ecx
lea eax, [eax + eax + 8]
add eax, ecx
push eax
mov dword [ebp - 0x2c], eax
call fcn.005bb17a
add esp, 4
mov dword [edi + 0x24], eax
cmp eax, ebx
jne 0x47bfa2
xor eax, eax
jmp 0x47c3ac
mov cx, word [ebp + 0x10]
mov word [eax], cx
mov edx, dword [edi + 0x24]
mov ax, word [ebp + 0x14]
mov word [edx + 2], ax
mov ecx, dword [edi + 0x24]
xor edx, edx
mov word [ecx + 4], dx
mov eax, dword [edi + 0x24]
xor ecx, ecx
mov word [eax + 6], cx
cmp esi, 1
je 0x47bfd4
mov edx, dword [edi + 0x24]
xor eax, eax
mov word [edx + 8], ax
or eax, 0xffffffff
push 0x676b78
mov dword [ebp - 0x7c], vtable.ATL::CImage.0
mov dword [ebp - 0x78], ebx
mov dword [ebp - 0x74], ebx
mov dword [ebp - 0x70], ebx
mov dword [ebp - 0x6c], ebx
mov dword [ebp - 0x68], ebx
mov dword [ebp - 0x64], ebx
mov word [ebp - 0x60], bx
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x54], ebx
mov dword [ebp - 0x50], ebx
mov dword [ebp - 0x4c], ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
inc dword [0x676b90]
push 0x676b78
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [ebp - 4], ebx
call fcn.004b5c24
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x47c03c
push 0x80004005
call fcn.004047e0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x20], esi
mov ecx, dword [esi - 0x10]
lea eax, [esi - 0x10]
mov byte [ebp - 4], 1
mov dword [ebp - 0x30], ecx
cmp dword [eax + 4], ebx
je 0x47c0a3
cmp dword [eax + 0xc], ebx
lea edx, [eax + 0xc]
jge 0x47c07b
cmp dword [esi - 8], ebx
jge 0x47c074
push 0x80070057
call fcn.004047e0
mov dword [esi - 0xc], ebx
mov byte [esi], bl
jmp 0x47c0a3
or esi, 0xffffffff
lock xadd dword [edx], esi
dec esi
test esi, esi
jg 0x47c094
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x30]
mov edx, dword [ecx]
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x20], eax
mov esi, eax
mov eax, dword [ebp - 0x28]
add eax, 0x14
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionA]
mov ecx, dword [ebp - 0x28]
cmp dword [ecx + 0x168], ebx
je 0x47c157
push str..doc
push eax
call fcn.005bcdf4
add esp, 8
test eax, eax
jne 0x47c157
mov esi, dword [ebp - 0x28]
push 1
add esi, 0x14
push esi
call fcn.0042dbe0
push 1
lea edx, [ebp - 0x30]
push esi
push edx
call fcn.0042a3d0
add esp, 0x14
push eax
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 2
call fcn.00406510
mov eax, dword [ebp - 0x30]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x47c122
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x20]
cmp dword [ecx - 0xc], ebx
je 0x47c154
mov eax, ecx
cmp dword [eax - 4], 1
jle 0x47c141
mov edx, dword [eax - 0xc]
push edx
lea ecx, [ebp - 0x20]
call fcn.00405c00
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x47c154
lea ecx, [ebp - 0x20]
call fcn.00405ef0
mov esi, dword [ebp - 0x20]
cmp dword [esi - 0xc], ebx
jne 0x47c18c
mov eax, dword [ebp - 0x28]
add eax, 0x14
cmp eax, ebx
jne 0x47c16a
xor eax, eax
jmp 0x47c179
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x47c170
sub eax, edx
push eax
mov eax, dword [ebp - 0x28]
add eax, 0x14
push eax
lea ecx, [ebp - 0x20]
call fcn.00406350
mov esi, dword [ebp - 0x20]
cmp dword [esi - 4], 1
jle 0x47c1a1
mov eax, dword [esi - 0xc]
push eax
lea ecx, [ebp - 0x20]
call fcn.00405c00
mov esi, dword [ebp - 0x20]
mov eax, dword [ebp - 0x28]
cmp word [eax + 0xe], 0xa
sete cl
cmp dword [eax + 0x164], ebx
movzx edx, cl
push edx
mov edx, dword [ebp - 0x44]
setne al
movzx ecx, al
mov eax, dword [ebp + 0x14]
push ecx
mov ecx, dword [ebp + 0x10]
push edx
push eax
push ecx
push esi
lea ecx, [ebp - 0xd4]
call fcn.0040f940
mov edx, dword [ebp - 0x28]
cmp dword [edx + 0x164], ebx
mov byte [ebp - 4], 3
setne al
movzx ecx, al
push ecx
lea ecx, [ebp - 0xd4]
call fcn.0040f530
test eax, eax
je 0x47c2ca
lea esp, [esp]
cmp byte [ebp - 0x21], bl
je 0x47c226
mov esi, dword [ebp - 0x3c]
add esi, dword [ebp - 0x2c]
mov ecx, dword [edi + 0x24]
push esi
push ecx
call fcn.005bede1
add esp, 8
cmp eax, ebx
je 0x47c2c7
mov dword [edi + 0x24], eax
mov dword [ebp - 0x2c], esi
mov esi, dword [edi + 0x24]
sub esi, dword [ebp - 0x3c]
add esi, dword [ebp - 0x2c]
cmp dword [ebp - 0x38], ebx
je 0x47c245
push 0x77
lea edx, [ebp - 0x7c]
push edx
lea ecx, [ebp - 0xd4]
call fcn.0040f7b0
xor edi, edi
cmp dword [ebp - 0x40], ebx
jle 0x47c29d
lea esp, [esp]
mov eax, dword [edi*4 + 0x5fdcf8]
test dword [ebp - 0x44], eax
je 0x47c297
cmp dword [ebp - 0x38], ebx
jne 0x47c281
push eax
lea edx, [ebp - 0x7c]
push edx
lea ecx, [ebp - 0xd4]
call fcn.0040f7b0
push ebx
lea eax, [ebp - 0x7c]
push eax
push esi
call fcn.0041b700
add esp, 0xc
jmp 0x47c290
push ebx
push eax
lea ecx, [ebp - 0x7c]
push ecx
push esi
call fcn.0041c620
add esp, 0x10
add esi, dword [ebp - 0x34]
inc dword [ebp + edi*4 - 0x1c]
inc edi
cmp edi, dword [ebp - 0x40]
jl 0x47c250
mov edx, dword [ebp - 0x28]
cmp dword [edx + 0x164], ebx
mov byte [ebp - 0x21], 1
setne al
movzx ecx, al
push ecx
lea ecx, [ebp - 0xd4]
call fcn.0040f530
mov edi, dword [ebp - 0x48]
test eax, eax
jne 0x47c200
mov esi, dword [ebp - 0x20]
cmp dword [ebp + 0x1c], 1
mov edx, dword [edi + 0x24]
mov ax, word [ebp - 0x1c]
mov word [edx + 4], ax
mov ecx, dword [edi + 0x24]
mov dx, word [ebp - 0x18]
mov word [ecx + 6], dx
je 0x47c2f1
mov eax, dword [edi + 0x24]
mov cx, word [ebp - 0x14]
mov word [eax + 8], cx
mov eax, dword [ebp - 0x2c]
and eax, 0xffffff
or eax, 0x1000000
lea ecx, [ebp - 0xd4]
mov dword [ebp - 0x34], eax
mov byte [ebp - 4], 1
call fcn.0040f5a0
add esi, 0xfffffff0
or edi, 0xffffffff
mov byte [ebp - 4], bl
lea edx, [esi + 0xc]
mov eax, edi
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x47c331
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov eax, dword [ebp - 0x78]
mov dword [ebp - 0x7c], vtable.ATL::CImage.0
cmp eax, ebx
je 0x47c362
push eax
mov dword [ebp - 0x78], ebx
mov dword [ebp - 0x74], ebx
mov dword [ebp - 0x70], ebx
mov dword [ebp - 0x6c], ebx
mov dword [ebp - 0x64], ebx
mov dword [ebp - 0x68], ebx
mov dword [ebp - 0x5c], edi
mov dword [ebp - 0x58], edi
mov word [ebp - 0x60], bx
call dword [sym.imp.GDI32.dll_DeleteObject]
mov esi, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0x676b78
call esi
dec dword [0x676b90]
jne 0x47c39e
push 0x676b78
call esi
mov eax, dword [0x676b74]
cmp eax, ebx
je 0x47c38d
push eax
call sub.gdiplus.dll_GdiplusShutdown
push 0x676b78
mov dword [0x676b74], ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 0x676b78
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp - 0x34]
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.005bb30e
mov esp, ebp
pop ebp
ret