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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5b2703
mov eax, dword fs:[0]
push eax
sub esp, 0x30
push ebx
push esi
push edi
mov eax, dword [0x6b06f8]
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.004b0830
mov dword [esp + 0x48], ebx
mov eax, dword [esp + 0x30]
cmp eax, 0xffffffff
je 0x4983e1
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 0x4981fa
cmp esi, 0x10
jbe 0x4983e1
mov eax, dword [esp + 0x38]
push 4
push str.MSDB
push eax
call fcn.00578964
add esp, 0xc
test eax, eax
jne 0x4983e1
mov ebx, dword [esp + 0x38]
add esi, 0xfffffffc
lea ecx, [esp + 0x18]
push esi
add ebx, 4
push ecx
call fcn.00483a10
add esp, 8
mov byte [esp + 0x48], 1
mov ebx, dword [ebp + 8]
cmp dword [ebx + 0x38], 0
je 0x49825f
lea edx, [esp + 0x20]
push str..patch
push edx
mov ecx, ebx
call fcn.0040fc53
add esp, 8
mov byte [esp + 0x48], 2
mov dword [esp + 0x1c], 1
jmp 0x498261
mov eax, ebx
mov eax, dword [eax]
sub eax, 0x10
call fcn.0040b401
lea edi, [eax + 0x10]
mov dword [esp + 0x24], edi
mov dword [esp + 0x48], 5
test byte [esp + 0x1c], 1
je 0x4982ab
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 0x4982ab
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 0x49838e
mov ecx, dword [eax + 4]
test ecx, ecx
je 0x49838e
mov eax, dword [eax]
push 1
push 0
push ecx
push eax
call fcn.0046eb10
add esp, 0x10
test al, al
je 0x49838e
lea esi, [esp + 0x30]
call fcn.004b0970
mov eax, dword [esp + 0x18]
cmp dword [eax + 4], 0
lea esi, [eax + 4]
mov edi, eax
je 0x498308
mov eax, dword [eax]
push 0
push eax
call fcn.005765a8
add esp, 8
mov dword [edi], eax
mov dword [esi], 0
cmp dword [ebx + 0x38], 0
jne 0x498324
mov eax, dword [ebx]
push eax
lea eax, [ebx + 8]
call fcn.004964e0
test al, al
je 0x49838e
mov byte [esp + 0x17], 1
jmp 0x49838e
lea ecx, [esp + 0x20]
push 0x6803e8
push ecx
mov ecx, ebx
call fcn.0040fc53
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.00497690
test al, al
je 0x498380
lea edi, [ebx + 8]
call fcn.00496830
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 0x498380
mov ebx, dword [ebx]
push ebx
mov eax, edi
call fcn.004964e0
test al, al
je 0x498380
mov byte [esp + 0x17], 1
mov byte [esp + 0x48], 5
lea ecx, [esp + 0x20]
call fcn.004085a2
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 0x4983b3
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 0x4983e1
xor edi, edi
call fcn.00428c7e
mov ecx, dword [esp + 0x18]
push ecx
call fcn.00573721
add esp, 4
mov dword [esp + 0x18], edi
mov dword [esp + 0x48], 0xffffffff
lea edx, [esp + 0x30]
push edx
call fcn.004b09b0
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