Function at 0x519699
Capabilities:
Encode data using xor
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7c
mov eax, dword [0x7b088c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0xc]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor ebx, ebx
push 0xf
mov dword [ebp - 0x74], eax
pop eax
mov dword [ebp - 0x7c], edi
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x3c], ebx
mov byte [ebp - 0x4c], bl
cmp dword [ebp + 0x10], ebx
je 0x51995b
cmp dword [ebp + 0x18], ebx
je 0x51995b
push ebx
push ebx
push 3
push ebx
push 1
push bind
call sym.txupd.exe_public:_wchar_t_const____thiscall_CTXStringW::operator_wchar_t_const__void_const
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x78], esi
cmp esi, 0xffffffff
jne 0x519709
mov dword [edi + 0x14], 0xf
jmp 0x51995e
xor edi, edi
lea ecx, [ebp - 0x70]
mov dword [ebp - 0x5c], edi
call fcn.005191ca
push 0
lea eax, [ebp - 0x54]
push eax
push 4
lea eax, [ebp - 0x50]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x5198bf
cmp dword [ebp - 0x54], 4
jne 0x5198bf
mov ecx, dword [ebp - 0x50]
lea eax, [ecx - 5]
cmp eax, 0xfffa
ja 0x5198bf
cmp edi, ecx
jae 0x519768
mov edi, ecx
push ebx
mov dword [ebp - 0x5c], edi
call fcn.006a389b
push edi
call fcn.006a66fd
pop ecx
pop ecx
mov ecx, dword [ebp - 0x50]
mov ebx, eax
push 0
mov dword [ebx], ecx
lea eax, [ebp - 0x54]
mov ecx, dword [ebp - 0x50]
push eax
add ecx, 0xfffffffc
lea eax, [ebx + 4]
push ecx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x5198bf
mov ecx, dword [ebp - 0x50]
lea eax, [ecx - 4]
cmp dword [ebp - 0x54], eax
jne 0x5198bf
movzx eax, word [ebx + 0x38]
cmp eax, ecx
jae 0x5198bf
movzx edx, word [ebx + 0x3a]
cmp edx, ecx
jae 0x5198bf
movzx eax, word [ebx + 0x3c]
cmp eax, ecx
jae 0x5198bf
movzx eax, word [ebx + 0x3e]
cmp eax, ecx
ja 0x5198bf
mov eax, dword [ebp + 0x10]
cmp dword [ebx + 0x30], eax
jne 0x519716
and dword [ebp - 0xc], 0
lea eax, [edx + ebx]
mov dword [ebp - 0x58], eax
lea ecx, [ebp - 0x1c]
xor eax, eax
mov dword [ebp - 8], 7
push 0x100
mov word [ebp - 0x1c], ax
call fcn.004d85bd
mov eax, dword [ebp - 0x58]
xor esi, esi
mov ax, word [eax]
xor ax, word [0x7a7df0]
movzx eax, ax
test ax, ax
je 0x519838
mov edi, dword [ebp - 0x58]
push eax
push 1
lea ecx, [ebp - 0x1c]
call fcn.0047447e
inc esi
mov eax, esi
and eax, 0x3f
mov ax, word [eax*2 + 0x7a7df0]
xor ax, word [edi + esi*2]
movzx eax, ax
test ax, ax
jne 0x519813
mov edi, dword [ebp - 0x74]
mov ecx, edi
call sym.txupd.exe_public:_int___thiscall_CTXStringW::GetLength_void_const
test eax, eax
je 0x519865
cmp dword [ebp - 8], 8
lea esi, [ebp - 0x1c]
mov ecx, edi
cmovae esi, dword [ebp - 0x1c]
call sym.txupd.exe_public:_wchar_t_const____thiscall_CTXStringW::operator_wchar_t_const__void_const
push eax
push esi
call fcn.00689cc8
pop ecx
pop ecx
test eax, eax
je 0x5198a8
mov eax, dword [ebp + 0x18]
cmp dword [ebp - 0x60], eax
jb 0x519875
lea ecx, [ebp - 0x70]
call fcn.0051ad3a
push dword [ebp - 0x50]
and dword [ebp - 0x24], 0
lea ecx, [ebp - 0x34]
push ebx
mov dword [ebp - 0x20], 0xf
mov byte [ebp - 0x34], 0
call fcn.004192a1
lea eax, [ebp - 0x34]
push eax
lea ecx, [ebp - 0x70]
call fcn.0051ad64
push 0
push 1
lea ecx, [ebp - 0x34]
call fcn.004191aa
push 0
push 1
lea ecx, [ebp - 0x1c]
call fcn.0042292c
mov esi, dword [ebp - 0x78]
mov edi, dword [ebp - 0x5c]
jmp 0x519716
push ebx
call fcn.006a389b
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp - 0x64]
lea eax, [ebp - 0x70]
push eax
push esi
lea ecx, [ebp - 0x10]
call fcn.005191e6
lea eax, [ebp - 0x70]
push eax
mov eax, dword [ebp - 0x60]
lea ecx, [ebp - 0x28]
add eax, esi
push eax
call fcn.005191e6
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0x7c]
cmp esi, dword [ebp - 0x20]
je 0x519938
mov ebx, dword [ebp - 0x10]
test ebx, ebx
jne 0x519905
xor eax, eax
jmp 0x519907
mov eax, dword [ebx]
mov ecx, dword [eax + 8]
mov eax, dword [eax + 4]
dec ecx
and ecx, esi
push 0xffffffffffffffff
push 0
push dword [eax + ecx*4]
lea ecx, [ebp - 0x4c]
call fcn.00430518
lea eax, [ebp - 0x70]
inc esi
push eax
mov eax, dword [ebp - 0x64]
lea ecx, [ebp - 0x28]
add eax, dword [ebp - 0x60]
push eax
call fcn.005191e6
cmp esi, dword [ebp - 0x20]
jne 0x5198fd
xor ebx, ebx
mov dword [edi + 0x14], 0xf
lea eax, [ebp - 0x4c]
mov dword [edi + 0x10], ebx
push eax
mov ecx, edi
mov byte [edi], bl
call fcn.004193c3
lea ecx, [ebp - 0x70]
call fcn.0051948e
jmp 0x51996e
mov dword [edi + 0x14], eax
lea eax, [ebp - 0x4c]
mov dword [edi + 0x10], ebx
push eax
mov ecx, edi
mov byte [edi], bl
call fcn.004193c3
push ebx
push 1
lea ecx, [ebp - 0x4c]
call fcn.004191aa
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00682c16
mov esp, ebp
pop ebp
ret