Function at 0x497e10
Capabilities:
Get file size
Move file
Persist via application shimming

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5b23f3
mov eax, dword fs:[0]
push eax
sub esp, 0x30
push ebx
push esi
push edi
mov eax, dword [0x6bd6f8]
xor eax, esp
push eax
lea eax, [esp + 0x40]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
push eax
lea ecx, [esp + 0x34]
xor ebx, ebx
push ecx
mov dword [esp + 0x24], ebx
mov byte [esp + 0x1f], bl
call fcn.004b0530
mov dword [esp + 0x48], ebx
mov eax, dword [esp + 0x30]
cmp eax, 0xffffffff
je 0x498071
lea edx, [esp + 0x28]
push edx
push eax
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp dword [esp + 0x28], ebx
ja 0x497e8a
cmp esi, 0x10
jbe 0x498071
mov eax, dword [esp + 0x38]
push 4
push str.MSDB
push eax
call fcn.00578644
add esp, 0xc
test eax, eax
jne 0x498071
mov ebx, dword [esp + 0x38]
add esi, 0xfffffffc
lea ecx, [esp + 0x18]
push esi
add ebx, 4
push ecx
call fcn.00483640
add esp, 8
mov byte [esp + 0x48], 1
mov ebx, dword [ebp + 8]
cmp dword [ebx + 0x38], 0
je 0x497eef
lea edx, [esp + 0x20]
push 0x68cc68
push edx
mov ecx, ebx
call fcn.0040fc0a
add esp, 8
mov byte [esp + 0x48], 2
mov dword [esp + 0x1c], 1
jmp 0x497ef1
mov eax, ebx
mov eax, dword [eax]
sub eax, 0x10
call fcn.0040b201
lea edi, [eax + 0x10]
mov dword [esp + 0x24], edi
mov dword [esp + 0x48], 5
test byte [esp + 0x1c], 1
je 0x497f3b
and dword [esp + 0x1c], 0xfffffffe
mov byte [esp + 0x48], 5
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x497f3b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x18]
cmp dword [eax], 0
je 0x49801e
mov ecx, dword [eax + 4]
test ecx, ecx
je 0x49801e
mov eax, dword [eax]
push 1
push 0
push ecx
push eax
call fcn.0046e800
add esp, 0x10
test al, al
je 0x49801e
lea esi, [esp + 0x30]
call fcn.004b0670
mov eax, dword [esp + 0x18]
cmp dword [eax + 4], 0
lea esi, [eax + 4]
mov edi, eax
je 0x497f98
mov eax, dword [eax]
push 0
push eax
call fcn.00576288
add esp, 8
mov dword [edi], eax
mov dword [esi], 0
cmp dword [ebx + 0x38], 0
jne 0x497fb4
mov eax, dword [ebx]
push eax
lea eax, [ebx + 8]
call fcn.00496170
test al, al
je 0x49801e
mov byte [esp + 0x17], 1
jmp 0x49801e
lea ecx, [esp + 0x20]
push str..merged
push ecx
mov ecx, ebx
call fcn.0040fc0a
add esp, 8
mov byte [esp + 0x48], 7
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
push edx
push eax
push ebx
call fcn.00497320
test al, al
je 0x498010
lea edi, [ebx + 8]
call fcn.004964c0
mov eax, dword [ebx]
mov ecx, dword [esp + 0x20]
push 1
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x498010
mov ebx, dword [ebx]
push ebx
mov eax, edi
call fcn.00496170
test al, al
je 0x498010
mov byte [esp + 0x17], 1
mov byte [esp + 0x48], 5
lea ecx, [esp + 0x20]
call fcn.0040856e
mov byte [esp + 0x48], 1
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x498043
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x48], 0
mov eax, dword [esp + 0x18]
dec dword [eax + 8]
mov esi, eax
add eax, 8
cmp dword [eax], 0
jne 0x498071
xor edi, edi
call fcn.00428aec
mov ecx, dword [esp + 0x18]
push ecx
call fcn.00573401
add esp, 4
mov dword [esp + 0x18], edi
mov dword [esp + 0x48], 0xffffffff
lea edx, [esp + 0x30]
push edx
call fcn.004b06b0
mov al, byte [esp + 0x17]
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8