Function at 0x4989c0
Capabilities:
Check if file exists
Encode data using xor
Read file on windows
Write file on windows

Disassembly:
sub esp, 0x448
mov eax, dword [0x61ac94]
xor eax, esp
mov dword [esp + 0x444], eax
mov eax, dword [esp + 0x450]
push esi
mov esi, dword [esp + 0x450]
push esi
mov dword [esp + 0xc], eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x498a08
pop esi
mov ecx, dword [esp + 0x444]
xor ecx, esp
call fcn.004e5fb0
add esp, 0x448
ret
push ebx
push edi
xor edi, edi
push edi
push 0x80
push 3
push edi
push 1
push SysReAllocString
xor ebx, ebx
push esi
mov dword [esp + 0x28], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x498c63
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
lea ecx, [esp + 0x1c]
push ecx
push 0x25
lea edx, [esp + 0x28]
push edx
push esi
mov dword [esp + 0x2c], edi
call ebp
test eax, eax
je 0x498aae
cmp dword [esp + 0x18], 0x25
jne 0x498aae
cmp byte [esp + 0x20], 0x25
jne 0x498aae
mov eax, dword [esp + 0x21]
test eax, eax
jbe 0x498aae
xor ecx, ecx
mov edx, 0x134
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004a3d20
add esp, 4
mov dword [esp + 0x10], eax
test eax, eax
je 0x498aaa
mov ecx, dword [esp + 0x21]
mov edx, dword [esp + 0x10]
imul ecx, ecx, 0x134
push ebx
lea eax, [esp + 0x1c]
push eax
push ecx
push edx
push esi
call ebp
test eax, eax
je 0x498aaa
lea edi, [ebx + 1]
mov ebx, dword [esp + 0x10]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
jne 0x498ae1
test ebx, ebx
je 0x498ac6
push ebx
call fcn.004a3d2b
add esp, 4
xor eax, eax
pop ebp
pop edi
pop ebx
pop esi
mov ecx, dword [esp + 0x444]
xor ecx, esp
call fcn.004e5fb0
add esp, 0x448
ret
xor ebp, ebp
cmp dword [esp + 0x21], ebp
jbe 0x498be7
lea esi, [ebx + 8]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edi, dword [esi - 8]
xor edi, dword [esp + 0x39]
mov eax, esi
xor edi, ebp
mov ecx, 0x4b
xor dword [eax], edi
add eax, 4
sub ecx, 1
jne 0x498b06
xor eax, eax
push 0x206
push eax
lea ecx, [esp + 0x4e]
push ecx
mov word [esp + 0x50], ax
call fcn.004e5fc0
xor edx, edx
push 0x206
push edx
lea eax, [esp + 0x262]
push eax
mov word [esp + 0x264], dx
call fcn.004e5fc0
add esp, 0x18
push esi
push 0x208
lea ecx, [esp + 0x254]
push ecx
call fcn.0041c6a0
lea edx, [esp + 0x44]
push edx
push esi
call fcn.004988e0
add esp, 8
test eax, eax
je 0x498b8a
cmp dword [esi - 8], 0
jne 0x498b84
lea eax, [esp + 0x44]
push eax
push 0x12c
push esi
call fcn.0041c6a0
jmp 0x498bb7
lea ecx, [esp + 0x44]
jmp 0x498ba3
cmp dword [esi - 8], 0
jne 0x498b9c
push esi
call ebx
lea eax, [eax + eax + 6]
mov dword [esi - 4], eax
jmp 0x498bc1
lea ecx, [esp + 0x24c]
push ecx
push str.___s
push 0x12c
push esi
call fcn.0041c900
add esp, 0x10
push esi
call ebx
lea edx, [eax + eax + 6]
mov dword [esi - 4], edx
mov eax, esi
mov ecx, 0x4b
xor dword [eax], edi
add eax, 4
sub ecx, 1
jne 0x498bc8
inc ebp
add esi, 0x134
cmp ebp, dword [esp + 0x21]
jb 0x498af6
mov ebx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x498ac6
push 0
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea ecx, [esp + 0x18]
push ecx
push 0x25
lea edx, [esp + 0x28]
push edx
push esi
call edi
mov ecx, dword [esp + 0x21]
imul ecx, ecx, 0x134
push 0
lea eax, [esp + 0x18]
push eax
push ecx
push ebx
push esi
call edi
push ebx
call fcn.004a3d2b
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
jmp 0x498ac8
mov ecx, dword [esp + 0x450]
pop edi
pop ebx
pop esi
xor ecx, esp
xor eax, eax
call fcn.004e5fb0
add esp, 0x448
ret