Function at 0x40be40
Capabilities:
Check if file exists
Delete file
Encode data using xor
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4f871b
mov eax, dword fs:[0]
push eax
mov eax, 0x26818
call fcn.0041c310
mov eax, dword [0x54636c]
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 - 0x267a0], ebx
lea eax, [ebx + 0x4c]
push eax
lea eax, [ebp - 0x2d8]
push eax
call fcn.004279a4
add esp, 8
lea ecx, [ebp - 0x26824]
mov dword [ebp - 4], 0
call fcn.004223db
cmp dword [ebp - 0x2c4], 0x10
lea eax, [ebp - 0x2d8]
lea ecx, [ebp - 0x26824]
mov byte [ebp - 4], 1
cmovae eax, dword [ebp - 0x2d8]
push eax
call fcn.0042248a
lea ecx, [ebp - 0x26824]
call fcn.004227e8
mov edi, eax
mov eax, 1
mov esi, dword [edi + 4]
sub esi, dword [edi]
cmove esi, eax
inc esi
push esi
call fcn.0041c0ba
push esi
push 0
push eax
mov dword [ebp - 0x2679c], eax
call fcn.0048faf0
mov ecx, dword [edi + 4]
add esp, 0x10
xor esi, esi
xor edx, edx
sub ecx, dword [edi]
je 0x40bf30
mov ebx, dword [ebp - 0x2679c]
mov eax, dword [edi]
lea ecx, [esi + 1]
mov al, byte [eax + edx]
xor al, byte [esi + str.c335b80a32136330ebfa2439bf4cbfcb]
xor esi, esi
mov byte [edx + ebx], al
inc edx
mov eax, dword [edi + 4]
sub eax, dword [edi]
cmp ecx, 0x20
cmovl esi, ecx
cmp edx, eax
jb 0x40bf07
mov ebx, dword [ebp - 0x267a0]
lea ecx, [ebp - 0x267f0]
call fcn.0041cde0
push 1
push 0
push dword [ebp - 0x2679c]
lea ecx, [ebp - 0x267f0]
mov byte [ebp - 4], 2
call fcn.0041f7d0
test eax, eax
je 0x40c8f8
push str.d52deb3e46
lea ecx, [ebp - 0x267f0]
call fcn.0041db00
test eax, eax
je 0x40c8f8
push str.e53e132109
mov ecx, eax
call fcn.0041db60
mov edi, eax
test edi, edi
je 0x40c8f8
mov esi, dword [ebx + 0x20]
mov ecx, dword [esi]
mov byte [ebp - 4], 3
push dword [ecx + 4]
mov ecx, esi
call fcn.00408580
mov eax, dword [esi]
mov ecx, ebx
mov byte [ebp - 4], 2
mov dword [eax + 4], eax
mov eax, dword [esi]
mov dword [eax], eax
mov eax, dword [esi]
mov dword [eax + 8], eax
mov dword [esi + 4], 0
push dword [ebx + 0x20]
push edi
call fcn.0040db10
xor eax, eax
mov dword [ebp - 0x27c], 7
push eax
push 0x501100
lea ecx, [ebp - 0x290]
mov dword [ebp - 0x280], 0
mov word [ebp - 0x290], ax
call fcn.004078c0
xor eax, eax
mov byte [ebp - 4], 4
push eax
push 0x501100
lea ecx, [ebp - 0x2c0]
mov dword [ebp - 0x2ac], 7
mov dword [ebp - 0x2b0], 0
mov word [ebp - 0x2c0], ax
call fcn.004078c0
xor eax, eax
mov byte [ebp - 4], 5
push eax
push 0x501100
lea ecx, [ebp - 0x2a8]
mov dword [ebp - 0x294], 7
mov dword [ebp - 0x298], 0
mov word [ebp - 0x2a8], ax
call fcn.004078c0
xor eax, eax
mov byte [ebp - 4], 6
push eax
push 0x501100
lea ecx, [ebp - 0x248]
mov dword [ebp - 0x234], 7
mov dword [ebp - 0x238], 0
mov word [ebp - 0x248], ax
call fcn.004078c0
push str.ddd536a420
push dword [ebx + 0x20]
mov byte [ebp - 4], 7
call fcn.0040ccf0
mov edx, eax
add esp, 8
test edx, edx
je 0x40c0cc
cmp word [edx], 0
jne 0x40c0a9
xor ecx, ecx
jmp 0x40c0bf
mov ecx, edx
lea esi, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40c0b0
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x290]
call fcn.004078c0
push str.aac89a94ff
push dword [ebx + 0x20]
call fcn.0040ccf0
mov edx, eax
add esp, 8
test edx, edx
je 0x40c10d
cmp word [edx], 0
jne 0x40c0ec
xor ecx, ecx
jmp 0x40c100
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40c0f1
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x2c0]
call fcn.004078c0
push str.dd0a159814
push dword [ebx + 0x20]
call fcn.0040ccf0
mov edx, eax
add esp, 8
test edx, edx
je 0x40c14e
cmp word [edx], 0
jne 0x40c12d
xor ecx, ecx
jmp 0x40c141
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40c132
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x2a8]
call fcn.004078c0
push str.c721c0dbf6
push dword [ebx + 0x20]
call fcn.0040ccf0
mov edx, eax
add esp, 8
test edx, edx
je 0x40c18f
cmp word [edx], 0
jne 0x40c16e
xor ecx, ecx
jmp 0x40c182
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40c173
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x248]
call fcn.004078c0
cmp dword [ebp - 0x280], 0
jne 0x40c19f
xor esi, esi
jmp 0x40c89a
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.0048faf0
add esp, 0xc
lea eax, [ebp - 0x218]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x320]
call fcn.0040ade0
mov esi, dword [ebx + 4]
xor ecx, ecx
mov eax, dword [ebx + 8]
xor edi, edi
mov ebx, eax
mov byte [ebp - 4], 8
sub ebx, esi
add ebx, 3
shr ebx, 2
cmp esi, eax
cmova ebx, ecx
test ebx, ebx
je 0x40c21b
nop word [eax + eax]
mov ecx, dword [esi]
test ecx, ecx
je 0x40c213
mov eax, dword [ecx]
push 0
push 0
push 0x46b
call dword [eax]
inc edi
add esi, 4
cmp edi, ebx
jne 0x40c200
mov ecx, dword [ebp - 0x267a0]
xor edi, edi
mov eax, dword [ecx + 8]
mov ebx, eax
mov esi, dword [ecx + 4]
sub ebx, esi
add ebx, 3
xor ecx, ecx
shr ebx, 2
cmp esi, eax
cmova ebx, ecx
test ebx, ebx
je 0x40c25b
nop
mov ecx, dword [esi]
test ecx, ecx
je 0x40c253
mov eax, dword [ecx]
push 0
push 0
push 0x465
call dword [eax]
inc edi
add esi, 4
cmp edi, ebx
jne 0x40c240
cmp dword [ebp - 0x27c], 8
lea eax, [ebp - 0x290]
cmovae eax, dword [ebp - 0x290]
push eax
lea eax, [ebp - 0x308]
push eax
call fcn.0042a691
lea eax, [ebp - 0x308]
mov byte [ebp - 4], 9
push eax
lea eax, [ebp - 0x320]
push eax
lea eax, [ebp - 0x278]
push eax
call fcn.0040a750
add esp, 0x14
cmp dword [ebp - 0x264], 8
lea eax, [ebp - 0x278]
mov byte [ebp - 4], 0xa
cmovae eax, dword [ebp - 0x278]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40c2dd
cmp dword [ebp - 0x264], 8
lea eax, [ebp - 0x278]
cmovae eax, dword [ebp - 0x278]
push eax
call fcn.0042a10e
add esp, 4
lea eax, [ebp - 0x320]
push eax
lea eax, [ebp - 0x2f0]
push eax
call fcn.004279a4
lea eax, [ebp - 0x290]
mov byte [ebp - 4], 0xb
push eax
lea eax, [ebp - 0x260]
push eax
call fcn.004279a4
mov ecx, eax
add esp, 0x10
cmp dword [ecx + 0x14], 0x10
jb 0x40c314
mov ecx, dword [ecx]
lea edx, [ebp - 0x968]
nop word [eax + eax]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx], al
lea edx, [edx + 1]
test al, al
jne 0x40c320
mov eax, dword [ebp - 0x24c]
cmp eax, 0x10
jb 0x40c34c
inc eax
lea ecx, [ebp - 0x260]
push eax
push dword [ebp - 0x260]
call fcn.00404710
cmp dword [ebp - 0x2dc], 0x10
lea ecx, [ebp - 0x2f0]
lea edx, [ebp - 0x768]
cmovae ecx, dword [ebp - 0x2f0]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx], al
lea edx, [edx + 1]
test al, al
jne 0x40c366
lea ecx, [ebp - 0x26798]
call fcn.00428b7e
sub esp, 0x300
mov byte [ebp - 4], 0xc
mov edi, esp
lea esi, [ebp - 0x968]
mov ecx, 0xc0
rep movsd dword es:[edi], dword [esi]
lea ecx, [ebp - 0x26798]
call fcn.00428c09
lea ecx, [ebp - 0x26798]
call fcn.004294ce
push 0x300
lea eax, [ebp - 0x668]
push 0
push eax
call fcn.0048faf0
xorps xmm0, xmm0
mov dword [ebp - 0x368], 0
add esp, 0xc
movups xmmword [ebp - 0x360], xmm0
nop dword [eax + eax]
lea ecx, [ebp - 0x26798]
call fcn.0042922d
test eax, eax
je 0x40c478
lea eax, [ebp - 0x668]
push eax
lea ecx, [ebp - 0x26798]
call fcn.00428faf
movsd xmm0, qword [ebp - 0x358]
xor ecx, ecx
divsd xmm0, qword [ebp - 0x360]
mov eax, dword [ebp - 0x267a0]
xor edi, edi
movsd qword [eax + 0x10], xmm0
mov esi, dword [eax + 4]
mulsd xmm0, qword [0x501918]
mov eax, dword [eax + 8]
mov ebx, eax
sub ebx, esi
add ebx, 3
shr ebx, 2
cmp esi, eax
cvttsd2si edx, xmm0
cmova ebx, ecx
mov dword [ebp - 0x2679c], edx
test ebx, ebx
je 0x40c470
nop
mov ecx, dword [esi]
test ecx, ecx
je 0x40c468
mov eax, dword [ecx]
push edx
push 0
push 0x466
call dword [eax]
mov edx, dword [ebp - 0x2679c]
inc edi
add esi, 4
cmp edi, ebx
jne 0x40c450
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [ebp - 0x26798]
call fcn.00429239
test eax, eax
je 0x40c3e0
lea eax, [ebp - 0x668]
push eax
lea ecx, [ebp - 0x26798]
call fcn.00428faf
movsd xmm0, qword [ebp - 0x358]
movsd qword [ebp - 0x267a8], xmm0
divsd xmm0, qword [ebp - 0x360]
mov ebx, dword [ebp - 0x267a0]
mov ecx, ebx
movsd qword [ebx + 0x10], xmm0
mulsd xmm0, qword [0x501918]
cvttsd2si eax, xmm0
push eax
push 0
push 0x466
call fcn.0040c970
movsd xmm0, qword [ebp - 0x267a8]
ucomisd xmm0, qword [ebp - 0x360]
lahf
test ah, 0x44
jp 0x40c503
ucomisd xmm0, qword [0x501908]
lahf
test ah, 0x44
jp 0x40c5c2
xor esi, esi
lea eax, [ebp - 0x248]
cmp dword [ebp - 0x234], 8
push esi
cmovae eax, dword [ebp - 0x248]
push 0x501100
push dword [ebp - 0x238]
push eax
call fcn.00408770
add esp, 0x10
test eax, eax
je 0x40c81c
sub esp, 0x18
mov ecx, esp
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], esi
cmp dword [ecx + 0x14], 8
jb 0x40c54f
mov eax, dword [ecx]
jmp 0x40c551
mov eax, ecx
xor edx, edx
push 0xffffffffffffffff
mov word [eax], dx
lea eax, [ebp - 0x278]
push edx
push eax
call fcn.004077a0
lea eax, [ebp - 0x260]
mov ecx, ebx
push eax
call fcn.0040cdf0
cmp dword [ebp - 0x234], 8
lea ecx, [ebp - 0x248]
lea eax, [ebp - 0x260]
cmovae ecx, dword [ebp - 0x248]
cmp dword [ebp - 0x24c], 8
push ecx
cmovae eax, dword [ebp - 0x260]
push eax
call fcn.004927c4
add esp, 8
lea ecx, [ebp - 0x260]
test eax, eax
mov eax, 1
cmove esi, eax
call fcn.00405fa0
test esi, esi
je 0x40c81c
mov esi, dword [ebx + 4]
xor ecx, ecx
mov eax, dword [ebx + 8]
xor edi, edi
mov ebx, eax
sub ebx, esi
add ebx, 3
shr ebx, 2
cmp esi, eax
cmova ebx, ecx
test ebx, ebx
je 0x40c5fb
nop
mov ecx, dword [esi]
test ecx, ecx
je 0x40c5f3
mov eax, dword [ecx]
push 0x64
push 0
push 0x466
call dword [eax]
inc edi
add esi, 4
cmp edi, ebx
jne 0x40c5e0
push 0x501100
lea ecx, [ebp - 0x230]
call fcn.0040ade0
push 1
push 0xffffffffffffffff
lea eax, [ebp - 0x2679c]
mov byte [ebp - 4], 0xd
push eax
lea ecx, [ebp - 0x308]
mov dword [ebp - 0x2679c], 0x2e
call fcn.0040e9a0
push eax
push 0
lea eax, [ebp - 0x260]
push eax
lea ecx, [ebp - 0x308]
call fcn.0040ea60
push str..exe
push eax
lea eax, [ebp - 0x338]
mov byte [ebp - 4], 0xe
push eax
call fcn.0040a6f0
add esp, 0xc
mov eax, dword [ebp - 0x24c]
mov byte [ebp - 4], 0x10
cmp eax, 8
jb 0x40c67f
inc eax
lea ecx, [ebp - 0x260]
push eax
push dword [ebp - 0x260]
call fcn.004079c0
xor eax, eax
mov dword [ebp - 0x24c], 7
mov word [ebp - 0x260], ax
lea eax, [ebp - 0x2c0]
push 0x501100
push eax
mov dword [ebp - 0x250], 0
call fcn.0040a6a0
add esp, 8
test al, al
je 0x40c6ca
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x2c0]
push eax
lea ecx, [ebp - 0x338]
call fcn.004077a0
lea eax, [ebp - 0x338]
push eax
lea eax, [ebp - 0x320]
push eax
lea eax, [ebp - 0x350]
push eax
call fcn.0040a750
add esp, 0xc
lea ecx, [ebp - 0x230]
push eax
call fcn.0040b570
lea ecx, [ebp - 0x350]
call fcn.00405fa0
cmp dword [ebp - 0x21c], 8
lea ecx, [ebp - 0x230]
lea eax, [ebp - 0x278]
cmovae ecx, dword [ebp - 0x230]
cmp dword [ebp - 0x264], 8
push ecx
cmovae eax, dword [ebp - 0x278]
push eax
call fcn.0042a45e
cmp dword [ebp - 0x21c], 8
lea eax, [ebp - 0x230]
cmovae eax, dword [ebp - 0x230]
push eax
call fcn.0042a411
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
add esp, 0xc
push 0x3e8
call ebx
cmp dword [ebp - 0x21c], 8
lea eax, [ebp - 0x230]
cmovae eax, dword [ebp - 0x230]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40c7c9
cmp dword [ebp - 0x21c], 8
lea eax, [ebp - 0x230]
cmovae eax, dword [ebp - 0x230]
push eax
call fcn.00427133
add esp, 4
test eax, eax
je 0x40c7c9
cmp dword [ebp - 0x294], 8
lea edx, [ebp - 0x2a8]
lea eax, [ebp - 0x230]
cmovae edx, dword [ebp - 0x2a8]
cmp dword [ebp - 0x21c], 8
push edx
cmovae eax, dword [ebp - 0x230]
push eax
call fcn.0042a9e8
add esp, 8
mov ecx, dword [ebp - 0x267a0]
push 0
push 0
push 0x469
call fcn.0040c970
cmp dword [ebp - 0x21c], 8
lea eax, [ebp - 0x230]
cmovae eax, dword [ebp - 0x230]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0x3e8
call ebx
lea ecx, [ebp - 0x338]
call fcn.00405fa0
lea ecx, [ebp - 0x230]
call fcn.00405fa0
mov esi, 1
jmp 0x40c863
movsd xmm0, qword [0x501910]
xor ecx, ecx
movsd qword [ebx + 0x10], xmm0
xor edi, edi
mov esi, dword [ebx + 4]
mov eax, dword [ebx + 8]
mov ebx, eax
sub ebx, esi
add ebx, 3
shr ebx, 2
cmp esi, eax
cmova ebx, ecx
test ebx, ebx
je 0x40c861
mov ecx, dword [esi]
test ecx, ecx
je 0x40c859
mov eax, dword [ecx]
push 0x64
push 0
push 0x467
call dword [eax]
inc edi
add esi, 4
cmp edi, ebx
jne 0x40c846
xor esi, esi
lea ecx, [ebp - 0x26798]
call fcn.00491db0
lea ecx, [ebp - 0x2f0]
call fcn.00403f20
lea ecx, [ebp - 0x278]
call fcn.00405fa0
lea ecx, [ebp - 0x308]
call fcn.00405fa0
lea ecx, [ebp - 0x320]
call fcn.00405fa0
mov eax, dword [ebp - 0x234]
cmp eax, 8
jb 0x40c8b8
inc eax
lea ecx, [ebp - 0x248]
push eax
push dword [ebp - 0x248]
call fcn.004079c0
xor eax, eax
mov dword [ebp - 0x234], 7
lea ecx, [ebp - 0x2a8]
mov dword [ebp - 0x238], 0
mov word [ebp - 0x248], ax
call fcn.00405fa0
lea ecx, [ebp - 0x2c0]
call fcn.00405fa0
lea ecx, [ebp - 0x290]
call fcn.00405fa0
jmp 0x40c8fa
xor esi, esi
mov eax, dword [ebp - 0x267bc]
mov dword [ebp - method.TiXmlDocument.virtual_0], vtable.TiXmlDocument.0
cmp eax, 0x54d21c
je 0x40c91a
push eax
call fcn.0041c0c3
add esp, 4
lea ecx, [ebp - 0x267f0]
call fcn.0041d240
lea ecx, [ebp - 0x26824]
call fcn.0042241c
mov ecx, dword [ebp - 0x2c4]
cmp ecx, 0x10
jb 0x40c94e
inc ecx
push ecx
push dword [ebp - 0x2d8]
lea ecx, [ebp - 0x2d8]
call fcn.00404710
mov eax, esi
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.0041bf36
mov esp, ebp
pop ebp
ret