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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x410
mov eax, dword [0x4f4214]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push 0x3ff
lea eax, [ebp - 0x403]
mov esi, ecx
push 0
push eax
mov dword [ebp - 0x410], esi
mov dword [ebp - 0x408], ebx
mov byte [ebp - 0x404], 0
call fcn.0049f910
push 0x4d45d8
push esi
call fcn.0049d1a1
mov esi, eax
add esp, 0x14
test esi, esi
jne 0x4917f7
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0049c72a
mov esp, ebp
pop ebp
ret
push edi
push 2
push 0
push esi
call fcn.0049d89d
push esi
call fcn.0049d7ae
push 0
push 0
push esi
mov edi, eax
call fcn.0049d89d
push esi
push 0x1a
lea ecx, [ebp - 0x404]
push 1
push ecx
call fcn.0049d402
add esp, 0x2c
cmp eax, 0x1a
je 0x49183c
call fcn.0049f9cc
mov edx, dword [eax]
push edx
push 0x129
jmp 0x491885
sub edi, 0x1a
mov dword [ebp - 0x40c], edi
xor eax, eax
jmp 0x491850
mov cl, byte [ebp + eax - 0x3f7]
xor byte [ebp + eax - 0x404], cl
inc eax
cmp eax, 0xd
jl 0x491850
push 0x4d46bc
push ebx
call fcn.0049d1a1
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x4918b1
call fcn.0049f9cc
mov edx, dword [eax]
push edx
push 0x13c
push str.decodeAuthFile
push str._s__d__error__d__n
call fcn.00487d90
push esi
call fcn.0049d986
add esp, 0x14
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0049c72a
mov esp, ebp
pop ebp
ret
push ebx
push 0xd
lea eax, [ebp - 0x404]
push 1
push eax
call fcn.0049d5a0
add esp, 0x10
cmp eax, 0xd
je 0x4918dc
call fcn.0049f9cc
mov ecx, dword [eax]
push ecx
push 0x144
jmp 0x491a9a
cmp edi, 0x1a
ja 0x491959
push esi
push 0x1a
lea ecx, [ebp - 0x404]
push 1
push ecx
call fcn.0049d402
mov edi, eax
add esp, 0x10
cmp edi, 0x1a
je 0x491a51
call fcn.0049f9cc
mov edx, dword [eax]
mov eax, dword [ebp - 0x410]
push edi
push edx
push eax
push 0x16f
push str.decodeAuthFile
push str._s__d____s__error__d__len__d__n
call fcn.00487d90
push esi
call fcn.0049d986
push ebx
call fcn.0049d986
mov ecx, dword [ebp - 0x408]
push ecx
call fcn.0049c9fe
add esp, 0x24
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0049c72a
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp - 0x40c]
lea eax, [edi - 0x1a]
push esi
cmp eax, 0x400
jb 0x491974
push 0x400
push 1
lea eax, [ebp - 0x404]
push eax
jmp 0x49197e
push eax
push 1
lea ecx, [ebp - 0x404]
push ecx
call fcn.0049d402
mov edi, eax
add esp, 0x10
test edi, edi
je 0x4919bb
push ebx
push edi
lea edx, [ebp - 0x404]
push 1
push edx
call fcn.0049d5a0
add esp, 0x10
test eax, eax
je 0x491a06
mov eax, dword [ebp - 0x40c]
sub eax, edi
mov dword [ebp - 0x40c], eax
cmp eax, 0x1a
ja 0x491953
jmp 0x4918e1
call fcn.0049f9cc
mov eax, dword [eax]
push eax
push 0x159
push str.decodeAuthFile
push str._s__d__error__d__n
call fcn.00487d90
push esi
call fcn.0049d986
push ebx
call fcn.0049d986
mov ecx, dword [ebp - 0x408]
push ecx
call fcn.0049c9fe
add esp, 0x1c
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0049c72a
mov esp, ebp
pop ebp
ret
call fcn.0049f9cc
mov edx, dword [eax]
push edx
push 0x163
push str.decodeAuthFile
push str._s__d__error__d__n
call fcn.00487d90
push esi
call fcn.0049d986
push ebx
call fcn.0049d986
mov eax, dword [ebp - 0x408]
push eax
call fcn.0049c9fe
add esp, 0x1c
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0049c72a
mov esp, ebp
pop ebp
ret
xor eax, eax
jmp 0x491a60
mov dl, byte [ebp + eax - 0x3f7]
xor byte [ebp + eax - 0x404], dl
inc eax
cmp eax, 0xd
jl 0x491a60
push ebx
push 0xd
lea eax, [ebp - 0x404]
push 1
push eax
call fcn.0049d5a0
add esp, 0x10
cmp eax, 0xd
je 0x491ad8
call fcn.0049f9cc
mov ecx, dword [eax]
push ecx
push 0x17e
push str.decodeAuthFile
push str._s__d__error__d__n
call fcn.00487d90
push esi
call fcn.0049d986
push ebx
call fcn.0049d986
mov edx, dword [ebp - 0x408]
push edx
call fcn.0049c9fe
add esp, 0x1c
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0049c72a
mov esp, ebp
pop ebp
ret
push ebx
call fcn.0049d986
push esi
call fcn.0049d986
mov ecx, dword [ebp - 4]
add esp, 8
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.0049c72a
mov esp, ebp
pop ebp
ret