Function at 0x463080
Capabilities:
Encode data using xor
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov eax, dword [0x52ec00]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0x10]
push ebx
push esi
push edi
mov esi, str.SQLite_format_3
lea edi, [ebp - 0x14]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x30], eax
movsd dword es:[edi], dword [esi]
mov dword [ebp - 0x38], 0x549658
cmp edx, 0x100
je 0x4630c4
mov dword [ebp - 0x38], 0x549570
mov eax, dword [ebp - 0x38]
call fcn.004625ed
xor ebx, ebx
push ebx
push 0x80
push 3
push ebx
push 3
push 0x120089
push dword [ebp - 0x3c]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x24], eax
cmp eax, 0xffffffff
jne 0x4630f6
xor eax, eax
jmp 0x463307
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x3c], eax
cmp eax, ebx
jne 0x463118
xor esi, esi
inc esi
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
jmp 0x463307
cmp eax, 0x20
jae 0x463122
push 2
pop esi
jmp 0x463108
mov esi, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push 4
push 0x1000
push 0x20
push ebx
call esi
mov edi, eax
mov dword [ebp - 0x1c], edi
cmp edi, ebx
jne 0x463141
push 4
jmp 0x46311f
push ebx
lea eax, [ebp - 0x40]
push eax
push 0x20
push edi
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x46315a
push 0x10
jmp 0x46311f
mov al, byte [edi + 0x10]
mov byte [ebp - 0x1f], al
mov al, byte [edi + 0x11]
mov byte [ebp - 0x20], al
movzx edi, word [ebp - 0x20]
mov eax, edi
and eax, 0x800003ff
jns 0x46317a
dec eax
or eax, 0xfffffc00
inc eax
je 0x463180
push 0x12
jmp 0x46311f
mov eax, dword [ebp - 0x1c]
mov cl, byte [eax + 0x14]
push 0x4000
push 0x20
push eax
mov byte [ebp - 0x15], cl
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push ebx
push ebx
push ebx
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 4
push 0x1000
push edi
push ebx
call esi
mov dword [ebp - 0x1c], eax
cmp eax, ebx
je 0x46313d
push 4
push 0x1000
push edi
push ebx
call esi
mov dword [ebp - 0x28], eax
cmp eax, ebx
je 0x46313d
push ebx
push 0x80
push 2
push ebx
xor esi, esi
inc esi
push esi
push 0x12019f
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x34], eax
cmp eax, 0xffffffff
jne 0x4631f5
push 8
jmp 0x46311f
push ebx
push ebx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x2c], esi
cmp edi, dword [ebp - 0x3c]
ja 0x4632cc
push ebx
lea eax, [ebp - 0x40]
push eax
push edi
push dword [ebp - 0x1c]
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x463316
push edi
push ebx
push dword [ebp - 0x28]
call fcn.004dbcc0
movsx esi, byte [ebp - 0x15]
mov edx, dword [ebp - 0x38]
add esp, 0xc
cmp dword [ebp + 0x10], 0x100
mov ecx, edi
jne 0x46324b
push 6
jmp 0x46324d
push 4
push esi
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x1c]
call fcn.00462fba
add esp, 0x14
push esi
mov esi, dword [ebp - 0x1c]
push dword [ebp - 0x28]
mov eax, edi
mov edi, esi
call fcn.00463040
cmp dword [ebp - 0x2c], 1
pop ecx
pop ecx
jne 0x46329e
push 0xf
pop ecx
lea edi, [ebp - 0x14]
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x46332d
mov ecx, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x28]
push 8
lea eax, [ecx + 0x10]
sub esi, ecx
pop edi
mov cl, byte [esi + eax]
xor byte [eax], cl
inc eax
dec edi
jne 0x463295
movzx edi, word [ebp - 0x20]
push ebx
lea eax, [ebp - 0x40]
push eax
push edi
push dword [ebp - 0x1c]
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x463332
add dword [ebp - 0x30], edi
mov eax, dword [ebp - 0x30]
inc dword [ebp - 0x2c]
add eax, edi
cmp eax, dword [ebp - 0x3c]
jbe 0x46320e
mov esi, dword [sym.imp.KERNEL32.dll_VirtualFree]
push 0x4000
push edi
push dword [ebp - 0x1c]
call esi
push 0x4000
push edi
push dword [ebp - 0x28]
call esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x24], ebx
je 0x4632f8
push dword [ebp - 0x24]
call esi
cmp dword [ebp - 0x34], ebx
je 0x463302
push dword [ebp - 0x34]
call esi
mov eax, 0x10000
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004d5a7d
leave
ret
push 0x10
pop edi
push dword [ebp - 0x24]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x34]
call esi
mov eax, edi
jmp 0x463307
or edi, 0xffffffff
jmp 0x463319
push 0x11
jmp 0x463318