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

Disassembly:
push 0xffffffffffffffff
push 0x583c3b
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push ebp
push esi
push edi
mov eax, dword [0x6531f0]
xor eax, esp
push eax
lea eax, [esp + 0x38]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x48]
xor ebx, ebx
mov dword [esp + 0x28], ebx
mov eax, dword [esp + 0x4c]
push eax
lea ecx, [esp + 0x30]
push ecx
mov byte [esp + 0x50], bl
call fcn.00478210
mov dword [esp + 0x40], ebx
mov eax, dword [esp + 0x2c]
cmp eax, 0xffffffff
je 0x470d69
lea edx, [esp + 0x20]
push edx
push eax
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp dword [esp + 0x20], ebx
ja 0x470bba
cmp esi, 0x10
jbe 0x470d69
mov eax, dword [esp + 0x34]
push 4
push str.MSDB
push eax
call fcn.004ff37b
add esp, 0xc
test eax, eax
jne 0x470d69
mov ecx, dword [esp + 0x34]
add esi, 0xfffffffc
push esi
add ecx, 4
push ecx
lea edx, [esp + 0x54]
push edx
call fcn.004789c0
add esp, 0xc
mov byte [esp + 0x40], 1
cmp dword [ebp + 0x38], ebx
je 0x470c1c
lea eax, [esp + 0x18]
push ebp
push eax
mov ebx, str..patch
call fcn.0042b340
add esp, 8
mov byte [esp + 0x40], 2
mov ebx, 1
mov dword [esp + 0x28], ebx
jmp 0x470c1e
mov eax, ebp
push eax
lea ecx, [esp + 0x20]
push ecx
call fcn.0040cbb0
mov dword [esp + 0x40], 4
test bl, 1
je 0x470c46
and ebx, 0xfffffffe
lea ecx, [esp + 0x18]
mov dword [esp + 0x28], ebx
call fcn.00402750
mov ecx, dword [esp + 0x4c]
cmp dword [ecx], 0
je 0x470d2d
mov eax, dword [ecx + 4]
test eax, eax
je 0x470d2d
mov ecx, dword [ecx]
mov edi, dword [esp + 0x1c]
push 0
push eax
push ecx
call fcn.0046d3f0
add esp, 0xc
test al, al
je 0x470d2d
lea esi, [esp + 0x2c]
call fcn.00478330
mov eax, dword [esp + 0x4c]
cmp dword [eax + 4], 0
lea esi, [eax + 4]
mov edi, eax
je 0x470ca5
mov eax, dword [eax]
push 0
push eax
call fcn.005004fd
add esp, 8
mov dword [edi], eax
mov dword [esi], 0
cmp dword [ebp + 0x38], 0
jne 0x470cc2
mov eax, dword [ebp]
push eax
lea eax, [ebp + 8]
call fcn.0046f0f0
test al, al
je 0x470d2d
mov byte [esp + 0x48], 1
jmp 0x470d2d
lea edx, [esp + 0x18]
push ebp
push edx
mov ebx, str..merged
call fcn.0042b340
add esp, 8
mov byte [esp + 0x40], 5
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
push eax
push ecx
push ebp
call fcn.004700a0
test al, al
je 0x470d1f
lea edi, [ebp + 8]
call fcn.0046f410
mov eax, dword [ebp]
mov edx, dword [esp + 0x18]
push 1
push eax
push edx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x470d1f
mov ebp, dword [ebp]
push ebp
mov eax, edi
call fcn.0046f0f0
test al, al
je 0x470d1f
mov byte [esp + 0x48], 1
mov byte [esp + 0x40], 4
lea ecx, [esp + 0x18]
call fcn.00402750
mov byte [esp + 0x40], 1
lea ecx, [esp + 0x1c]
call fcn.00402750
mov byte [esp + 0x40], 0
mov eax, dword [esp + 0x4c]
dec dword [eax + 8]
mov esi, eax
add eax, 8
cmp dword [eax], 0
jne 0x470d69
xor edi, edi
call fcn.00431b10
mov eax, dword [esp + 0x4c]
push eax
call fcn.004fdb3f
add esp, 4
mov dword [esp + 0x4c], edi
mov dword [esp + 0x40], 0xffffffff
lea ecx, [esp + 0x2c]
push ecx
call fcn.00478370
mov al, byte [esp + 0x48]
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret 8