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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x228
mov eax, dword [0x641a90]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 0xc], 0x2000200
push 0
mov dword [ebp - 8], 0x2000200
push dword [edi + 0x3a0]
push dword [edi + 0x4fa58]
call fcn.00595cb4
add esp, 0xc
mov ecx, edi
call fcn.004d2a10
mov ecx, edi
mov esi, eax
call fcn.004d2a10
mov ecx, edi
call fcn.004d2a10
mov ecx, edi
call fcn.004d2a10
mov ebx, eax
mov ecx, edi
mov dword [ebp - 0x21c], ebx
call fcn.004d2a10
mov dword [ebp - 0x214], eax
cmp esi, 2
jne 0x4d1a44
push dword [edi + 0x4fa58]
push dword [edi + 0x3ac]
push 1
push dword [edi + 8]
call fcn.00595b79
xor esi, esi
add esp, 0x10
cmp dword [edi + 0x3ac], esi
jbe 0x4d1bb0
mov ebx, dword [ebp - 0x214]
mov ecx, 0x3bcd0
lea ebx, [ebx]
imul eax, ebx, 0x63d
xor edx, edx
add eax, 0xca25
div ecx
mov ecx, 0x11f9f253
mov ebx, edx
mov eax, ebx
mul ecx
mov ecx, ebx
shrd eax, edx, 0x18
shl ecx, 8
sub ecx, eax
sar edx, 0x18
mov edx, dword [edi + 8]
shr ecx, 1
add ecx, eax
shr ecx, 0x11
xor byte [edx + esi], cl
inc esi
mov ecx, 0x3bcd0
cmp esi, dword [edi + 0x3ac]
jb 0x4d19f0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret
cmp esi, 4
jne 0x4d1b96
push dword [edi + 8]
call fcn.00592c4b
mov eax, dword [ebp - 0x214]
imul eax, ebx
lea eax, [eax + eax*2]
shr eax, 1
push eax
mov dword [edi + 0x3ac], eax
call fcn.00593e38
add esp, 8
mov dword [edi + 8], eax
mov ecx, edi
push str.foveon_load_camf__
push eax
call fcn.004dc800
lea eax, [ebp - 0x210]
mov ecx, edi
push eax
call fcn.004cebd0
mov ecx, edi
call fcn.004d2a10
push 0
push 0xffffffffffffffff
mov ecx, edi
call fcn.004d2ef0
xor eax, eax
xor esi, esi
mov dword [ebp - 0x218], eax
cmp dword [ebp - 0x214], eax
jbe 0x4d1bb0
mov edx, dword [ebp - 0x214]
mov ecx, ebx
xor ebx, ebx
test ecx, ecx
je 0x4d1b76
lea ebx, [ebx]
lea eax, [ebp - 0x210]
mov ecx, edi
push eax
call fcn.004da660
mov dword [ebp - 0x228], eax
cmp ebx, 2
jae 0x4d1b0d
mov ecx, dword [ebp - 0x218]
lea edx, [ebp - 0xc]
and ecx, 1
lea ecx, [ebx + ecx*2]
lea edx, [edx + ecx*2]
movzx ecx, word [edx]
add eax, ecx
mov word [edx], ax
mov word [ebp + ebx*2 - 0x224], ax
jmp 0x4d1b20
mov ecx, dword [ebp - 0x228]
mov eax, ebx
and eax, 1
add word [ebp + eax*2 - 0x224], cx
test bl, 1
je 0x4d1b57
mov ecx, dword [edi + 8]
mov eax, dword [ebp - 0x224]
mov edx, eax
shr edx, 4
shl al, 4
mov byte [esi + ecx], dl
mov edx, dword [ebp - 0x222]
mov ecx, edx
shr ecx, 8
or cl, al
mov eax, dword [edi + 8]
mov byte [esi + eax + 1], cl
mov eax, dword [edi + 8]
mov byte [esi + eax + 2], dl
add esi, 3
inc ebx
cmp ebx, dword [ebp - 0x21c]
jb 0x4d1ad0
mov eax, dword [ebp - 0x218]
mov ecx, dword [ebp - 0x21c]
mov edx, dword [ebp - 0x214]
inc eax
mov dword [ebp - 0x218], eax
cmp eax, edx
jb 0x4d1ac0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret
push esi
push dword [edi + 4]
push str._s_has_unknown_CAMF_type__d._n
call fcn.00592f31
add eax, 0x40
push eax
call fcn.0059320e
add esp, 0x10
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005920c1
mov esp, ebp
pop ebp
ret