Function at 0x4798e0
Capabilities:
Check if file exists
Encode data using xor
Get system information on windows
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
mov eax, dword [0x5dccb4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], esi
mov eax, dword [edi + 0x20]
cmp dword [eax - 0xc], 0
je 0x479b49
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x479b49
cmp dword [edi + 0x6c], 0
mov eax, dword [edi + 0x20]
je 0x47994b
push esi
push ebx
push eax
call fcn.004b9b00
xor ecx, ecx
test eax, eax
pop edi
setns cl
pop esi
mov eax, ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b0a78
mov esp, ebp
pop ebp
ret 0xc
push 0
push 1
push 3
push 0
push 7
push SysReAllocString
push eax
mov ebx, 0xffffd8f0
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x3c], esi
test esi, esi
je 0x479b26
cmp esi, 0xffffffff
je 0x479b1f
push 0
push 0
push 0
push 2
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [ebp - 0x24], eax
test eax, eax
je 0x479b1f
mov esi, dword [edi + 8]
lea eax, [ebp - 0x60]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, esi
xor edx, edx
div dword [ebp - 0x44]
mov eax, dword [edi + 8]
push 0
sub esi, edx
push esi
push 0
sub eax, esi
mov esi, dword [ebp - 0x24]
push 4
push esi
mov dword [ebp - 0x1c], eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x38], eax
test eax, eax
je 0x479b15
add eax, dword [ebp - 0x1c]
mov dword [ebp - 0x20], eax
je 0x479b0c
lea ecx, [ebp - 0x14]
push ecx
push dword [edi + 0xc]
push eax
call fcn.0040bc30
add esp, 0xc
lea edx, [edi + 0x10]
lea ecx, [ebp - 0x14]
mov esi, 0xc
nop dword [eax]
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x479b04
add ecx, 4
add edx, 4
sub esi, 4
jae 0x479a00
mov esi, dword [edi + 0xc]
push 0x5e4a32
push esi
call fcn.004b151d
mov ebx, eax
add esp, 8
mov dword [ebp - 0x1c], ebx
test ebx, ebx
je 0x479afd
push esi
push 0
push ebx
call fcn.00516300
mov ecx, dword [ebp - 0x20]
add esp, 0xc
mov dl, byte [ecx]
movzx eax, dl
mov ecx, eax
mov byte [ebx], dl
mov ebx, dword [edi + 0xc]
mov esi, ebx
shl ecx, 8
or ecx, eax
mov byte [ebp - 0x15], dl
shl ecx, 8
or ecx, eax
shl ecx, 8
or ecx, eax
lea eax, [ebx - 4]
mov dword [ebp - 0x2c], ecx
mov ecx, 1
cmp eax, ecx
jbe 0x479a9f
mov eax, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x20]
sub ebx, eax
mov dword [ebp - 0x28], ebx
lea edx, [eax + 1]
jmp 0x479a84
mov ebx, dword [ebp - 0x28]
mov eax, dword [ebx + edx]
lea edx, [edx + 4]
xor eax, dword [ebp - 0x2c]
add ecx, 4
mov dword [edx - 4], eax
mov ebx, dword [edi + 0xc]
mov esi, ebx
lea eax, [ebx - 4]
cmp ecx, eax
jb 0x479a81
cmp ecx, ebx
mov ebx, dword [ebp - 0x1c]
jae 0x479acd
mov eax, dword [ebp - 0x20]
lea edx, [ecx + ebx]
sub eax, ebx
mov bl, byte [ebp - 0x15]
mov dword [ebp - 0x20], eax
mov al, byte [edx + eax]
lea edx, [edx + 1]
xor al, bl
inc ecx
mov byte [edx - 1], al
mov esi, dword [edi + 0xc]
mov eax, dword [ebp - 0x20]
cmp ecx, esi
jb 0x479ab4
mov ebx, dword [ebp - 0x1c]
push dword [ebp - 0x30]
mov eax, esi
push dword [ebp - 0x34]
cdq
push edx
push eax
push ebx
push dword [edi + 0x20]
call fcn.004b98a0
push dword [ebp - 0x1c]
test eax, eax
mov ecx, 1
mov ebx, 0xffffd8f0
cmovns ebx, ecx
call fcn.004b1518
add esp, 4
jmp 0x479b09
mov ebx, 0xffffd8f0
jmp 0x479b09
mov ebx, 0xffffd8ee
mov esi, dword [ebp - 0x24]
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp - 0x3c]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
push str.nRet_d
call fcn.004790f0
add esp, 8
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b0a78
mov esp, ebp
pop ebp
ret 0xc
mov ecx, dword [ebp - 4]
mov eax, 0xffffd8ee
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004b0a78
mov esp, ebp
pop ebp
ret 0xc