Function at 0x407040
Capabilities:
Delete file
Encode data using xor
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x47d6f7
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x19144
call fcn.00437870
mov eax, dword [0x4a9e6c]
push ebx
mov dword [esp + 0x19144], eax
mov eax, dword [ebp + 0xc]
push esi
mov esi, ecx
xor ebx, ebx
cmp eax, ebx
push edi
mov dword [esp + 0x10], esi
mov dword [esi], 0x483e68
je 0x407285
call fcn.00456579
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0xc], eax
xor eax, eax
mov byte [esp + 0x40], bl
mov ecx, 0x40
lea edi, [esp + 0x41]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x40]
push eax
push 0x104
mov dword [esp + 0x19164], ebx
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea ecx, [esp + 0x40]
push ecx
lea ecx, [esp + 0x18]
call fcn.00406f90
push str.BHINIFILE.tmp
push eax
lea edx, [esp + 0x20]
push edx
mov byte [esp + 0x19168], 1
call fcn.00406df0
add esp, 0xc
push eax
lea ecx, [esp + 0x10]
mov byte [esp + 0x19160], 2
call fcn.00406d40
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0x1915c], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40712d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0x1915c], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407152
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov esi, dword [esp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov byte [esp + 0x148], bl
xor eax, eax
mov ecx, 0x63ff
lea edi, [esp + 0x149]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x1c]
stosb byte es:[edi], al
call fcn.00457124
mov eax, dword [ebp + 8]
push ebx
push ebx
push eax
lea ecx, [esp + 0x28]
mov byte [esp + 0x19168], 3
call fcn.0045746c
push 0x19000
lea ecx, [esp + 0x14c]
push ecx
lea ecx, [esp + 0x24]
call fcn.00456e37
lea ecx, [esp + 0x1c]
call fcn.004570c2
lea eax, [esp + 0x148]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4071c0
sub eax, edx
cmp eax, ebx
lea ecx, [esp + 0x148]
jle 0x4071e4
mov edi, eax
mov dl, byte [ecx]
xor dl, 0xbd
add dl, 0x69
mov byte [ecx], dl
inc ecx
dec edi
jne 0x4071d6
lea ecx, [esp + 0x2c]
call fcn.004579d8
push ebx
push 0x5001
push esi
lea ecx, [esp + 0x38]
mov byte [esp + 0x19168], 4
call fcn.00457a40
cmp eax, 1
jne 0x407224
lea eax, [esp + 0x148]
push eax
lea ecx, [esp + 0x30]
call fcn.00457bfd
lea ecx, [esp + 0x2c]
call fcn.00457dc9
cmp esi, ebx
mov edi, dword [esp + 0x10]
mov dword [edi + 4], ebx
je 0x40723b
push esi
call fcn.004371fd
add esp, 4
mov dword [edi + 4], eax
lea ecx, [esp + 0x2c]
mov byte [esp + 0x1915c], 3
call fcn.00457e05
lea ecx, [esp + 0x1c]
mov byte [esp + 0x1915c], bl
call fcn.00457163
lea eax, [esi - 0x10]
mov dword [esp + 0x1915c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407281
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, edi
jmp 0x40729d
mov eax, dword [ebp + 8]
cmp eax, ebx
mov dword [esi + 4], ebx
je 0x40729b
push eax
call fcn.004371fd
add esp, 4
mov dword [esi + 4], eax
mov eax, esi
mov ecx, dword [esp + 0x19154]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x1914c]
call fcn.004368a4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8