Function at 0x40c820
Capabilities:
Check if file exists
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4dceb9
mov eax, dword fs:[0]
push eax
sub esp, 0x26c
mov eax, dword [0x51938c]
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, ecx
mov dword [ebp - 0x240], ebx
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.004b5160
add esp, 0xc
lea eax, [ebp - 0x218]
push 0
push 0x1a
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push str.ADBlockMaster
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40c8b1
lea eax, [ebp - 0x218]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
xor eax, eax
mov dword [ebp - 0x228], 0
lea ecx, [ebp - 0x218]
mov dword [ebp - 0x224], 7
mov word [ebp - 0x238], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40c8d7
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x238]
call fcn.00408a10
mov dword [ebp - 4], 1
call fcn.004049b0
mov ecx, eax
test ecx, ecx
je 0x40cb8c
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x21c], eax
mov byte [ebp - 4], 2
lea eax, [ebp - 0x238]
cmp dword [ebp - 0x224], 8
push str.ADBlockMaster_tray.log
cmovae eax, dword [ebp - 0x238]
push eax
lea eax, [ebp - 0x21c]
push str._s_s
push eax
call fcn.0040a370
add esp, 0x10
mov byte [ebp - 4], 3
call fcn.004049b0
mov ecx, eax
test ecx, ecx
je 0x40cb96
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x220], eax
mov byte [ebp - 4], 4
lea eax, [ebp - 0x220]
mov esi, dword [ebp - 0x21c]
push esi
push str._s.on
push eax
call fcn.0040a370
mov edi, dword [ebp - 0x220]
add esp, 0xc
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40c9a8
mov byte [ebx + 4], al
jmp 0x40cafd
push 0x28
mov byte [ebx + 4], 1
call fcn.00488d7a
mov ebx, eax
add esp, 4
mov dword [ebp - 0x244], ebx
mov byte [ebp - 4], 7
lea ecx, [ebx + 0xc]
mov dword [ebx], vtable.Utils::LogAppender.0
mov edx, esi
mov dword [ebx + 4], 0
xor eax, eax
mov byte [ebx + 8], 1
mov dword [ecx + 0x10], 0
mov dword [ecx + 0x14], 7
mov word [ecx], ax
lea eax, [edx + 2]
mov dword [ebp - 0x23c], eax
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x40c9f4
sub edx, dword [ebp - 0x23c]
sar edx, 1
push edx
push esi
call fcn.00408a10
mov eax, dword [ebp - 0x240]
mov dword [ebx + 0x24], 0xffffffff
mov byte [ebp - 4], 4
mov dword [eax + 0x20], ebx
mov eax, dword [ebx]
mov ebx, dword [eax]
lea eax, [ebp - 0x274]
push eax
call fcn.0040cbb0
push str._____________________log_start_____________________________r_n
mov edx, eax
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x25c]
call fcn.0040e830
add esp, 4
mov byte [ebp - 4], 9
mov ecx, dword [ebp - 0x244]
push eax
call ebx
mov byte [ebp - 4], 8
mov edx, dword [ebp - 0x248]
cmp edx, 8
jb 0x40ca9c
mov ecx, dword [ebp - 0x25c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40ca92
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40cba0
push edx
push ecx
call fcn.00489027
add esp, 8
xor eax, eax
mov byte [ebp - 4], 4
mov edx, dword [ebp - 0x260]
mov dword [ebp - 0x24c], 0
mov dword [ebp - 0x248], 7
mov word [ebp - 0x25c], ax
cmp edx, 8
jb 0x40cafd
mov ecx, dword [ebp - 0x274]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40caf3
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40cba5
push edx
push ecx
call fcn.00489027
add esp, 8
lea edx, [edi - 0x10]
or edi, 0xffffffff
mov byte [ebp - 4], 0xa
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40cb1b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 0xfffffff0
mov byte [ebp - 4], 0xb
lock xadd dword [esi + 0xc], edi
dec edi
test edi, edi
jg 0x40cb34
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x224]
cmp edx, 8
jb 0x40cb70
mov ecx, dword [ebp - 0x238]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40cb66
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40cbaa
push edx
push ecx
call fcn.00489027
add esp, 8
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.00488adc
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.00404780
push 0x80004005
call fcn.00404780
call fcn.004b8ab4
call fcn.004b8ab4
call fcn.004b8ab4
int3