Function at 0x4a91c0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x108
mov eax, dword [0x68d220]
push ebx
push ebp
push esi
push edi
xor esi, esi
mov di, dx
cmp eax, esi
mov word [esp + 0x10], di
mov ebx, ecx
je 0x4a91eb
push eax
call sub.storm.dll_Ordinal_458
mov dword [0x68d220], esi
cmp di, 0xffff
jne 0x4a921c
mov eax, dword [0x68d1f0]
mov dword [eax + 0x26], esi
mov ecx, dword [0x68d1f0]
mov word [ecx + 0x24], di
mov ecx, dword [0x68d1f0]
call fcn.004d8ae0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x108
ret 4
cmp di, 0x52
jne 0x4a9285
cmp ebx, esi
je 0x4a9285
mov edx, dword [ebx + 0xc]
xor ecx, ecx
mov cl, byte [edx + 0xa]
call fcn.00418880
cmp al, 8
mov byte [esp + 0x10], al
jb 0x4a924d
movzx bp, al
add ebp, 0x62
mov dword [esp + 0x10], ebp
mov di, word [esp + 0x10]
jmp 0x4a9289
mov ecx, dword [esp + 0x10]
and ecx, 0xff
mov cl, byte [ecx + 0x50f1aa]
test cl, cl
je 0x4a9273
movzx bp, cl
add ebp, 0x62
mov dword [esp + 0x10], ebp
mov di, word [esp + 0x10]
jmp 0x4a9289
movzx bp, al
add ebp, 0x52
mov dword [esp + 0x10], ebp
mov di, word [esp + 0x10]
jmp 0x4a9289
mov ebp, dword [esp + 0x10]
mov eax, dword [0x68d1f0]
cmp dword [eax + 0x26], ebx
jne 0x4a9299
cmp word [eax + 0x24], di
je 0x4a92e7
mov cl, byte [0x6b3e07]
mov esi, dword [0x6b2e64]
mov dword [0x6b2e64], 0x68d1e8
call fcn.004d4e80
mov ecx, dword [0x68d1f0]
mov dword [0x6b2e64], esi
call fcn.004d8b10
mov edx, dword [0x68d1f0]
mov byte [0x68d1b8], 0
mov byte [0x68d21c], 1
xor esi, esi
mov dword [edx + 0x26], ebx
mov eax, dword [0x68d1f0]
mov word [eax + 0x24], di
mov eax, dword [esp + 0x11c]
mov edi, 2
and eax, 0xffff
sub eax, edi
je 0x4a9459
mov eax, dword [0x4f8794]
xor bl, bl
cmp eax, edi
jne 0x4a93ad
mov ecx, dword [0x4f8798]
mov edx, dword [0x4f879c]
mov esi, dword [0x4f87a0]
add ecx, edx
add esi, ecx
add edx, 0x71823402
xor edx, esi
mov dword [0x4f87a0], esi
shr ecx, 1
mov eax, edx
mov dword [0x4f879c], edx
xor eax, ecx
mov dword [0x4f8798], ecx
and eax, 0x7f
cmp eax, 0x65
jb 0x4a9379
add ecx, edx
add edx, 0x71823402
add esi, ecx
xor edx, esi
shr ecx, 1
mov eax, edx
xor eax, ecx
and eax, 0x7f
cmp eax, 0x65
jae 0x4a934d
mov dword [0x4f8798], ecx
mov dword [0x4f879c], edx
mov dword [0x4f87a0], esi
mov ecx, dword [0x68d200]
mov edx, ebp
xor bl, bl
and edx, 0xffff
mov cl, byte [ecx + edx]
cmp al, cl
jbe 0x4a93a4
inc bl
movsx esi, bl
mov esi, dword [esi*4 + 0x68d200]
add cl, byte [esi + edx]
cmp bl, 4
jl 0x4a938c
cmp bl, 4
jl 0x4a93ab
xor bl, bl
xor esi, esi
test bl, bl
jl 0x4a943b
cmp dword [0x68d220], esi
jne 0x4a943b
mov eax, ebp
movsx edx, bl
and eax, 0xffff
push edx
lea edx, [esp + 0x18]
mov ecx, dword [eax*4 + 0x653c08]
push ecx
push str.portrait_
push str._s_s_d.smk
push 0x104
push edx
call fcn.004d39c0
mov eax, 0x68d220
add esp, 0x18
test eax, eax
je 0x4a93fb
mov dword [0x68d220], esi
cmp dword [0x4f8794], esi
je 0x4a9433
mov ecx, dword [0x68d1ec]
push 0x68d220
push 0x21100000
push esi
push 0x68d1d8
push 0x68d1c0
lea edx, [esp + 0x28]
push ecx
push edx
mov dword [0x68d224], 1
call sub.storm.dll_Ordinal_454
dec bl
jns 0x4a93b5
mov ecx, dword [0x68d1f0]
call fcn.004d8aa0
mov dword [0x68d1f8], esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x108
ret 4
mov eax, dword [0x4f8794]
xor bl, bl
cmp eax, edi
jne 0x4a94ef
mov ecx, dword [0x4f8798]
mov edx, dword [0x4f879c]
mov esi, dword [0x4f87a0]
add ecx, edx
add esi, ecx
add edx, 0x71823402
xor edx, esi
mov dword [0x4f87a0], esi
shr ecx, 1
mov eax, edx
mov dword [0x4f879c], edx
xor eax, ecx
mov dword [0x4f8798], ecx
and eax, 3
cmp eax, 3
jb 0x4a94d2
add ecx, edx
add edx, 0x71823402
add esi, ecx
xor edx, esi
shr ecx, 1
mov eax, edx
xor eax, ecx
and eax, 3
cmp eax, 3
jae 0x4a94a6
mov dword [0x4f8798], ecx
mov dword [0x4f879c], edx
mov dword [0x4f87a0], esi
mov cl, byte [0x68d1d0]
mov bl, al
cmp al, cl
jne 0x4a94ed
movsx eax, al
add eax, edi
mov ecx, 3
cdq
idiv ecx
mov bl, dl
xor esi, esi
test bl, bl
jl 0x4a957d
cmp dword [0x68d220], esi
jne 0x4a957d
mov eax, ebp
movsx edx, bl
and eax, 0xffff
push edx
lea edx, [esp + 0x18]
mov ecx, dword [eax*4 + 0x653dc0]
push ecx
push str.portrait_
push str._s_s_d.smk
push 0x104
push edx
call fcn.004d39c0
mov eax, 0x68d220
add esp, 0x18
test eax, eax
je 0x4a953d
mov dword [0x68d220], esi
cmp dword [0x4f8794], esi
je 0x4a9575
mov ecx, dword [0x68d1ec]
push 0x68d220
push 0x21100000
push esi
push 0x68d1d8
push 0x68d1c0
lea edx, [esp + 0x28]
push ecx
push edx
mov dword [0x68d224], 1
call sub.storm.dll_Ordinal_454
dec bl
jns 0x4a94f7
mov ecx, dword [0x68d1f0]
mov byte [0x68d1d0], bl
call fcn.004d8aa0
mov dword [0x68d1f8], 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x108
ret 4