Function at 0x403b70
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x20
mov ax, word [0x4bd590]
mov ecx, 0x158a
inc ax
mov edx, dword [esp + 0x28]
mov word [0x4bd590], ax
movzx eax, ax
mov dword [esp + 0x10], eax
imul eax, dword [esp + 0x30], 0xc
push ebx
mov ebx, dword [esp + 0x40]
push ebp
mov ebp, dword [0x4bd564]
push esi
mov esi, dword [esp + 0x38]
push edi
sub ecx, dword [eax + edx]
mov edi, 0x1090
mov dword [esp + 0x14], ecx
mov ecx, dword [0x4bd560]
inc ecx
mov eax, ecx
mov dword [0x4bd560], ecx
cdq
idiv ecx
dec dword [0x4bd584]
mov eax, dword [esp + 0x48]
movzx ecx, byte [esi + ebp*2 + 3]
mov dword [esp + 0x10], edx
xor edx, edx
movzx eax, byte [eax + 0x9a8]
sub ecx, eax
mov eax, dword [0x4bd5e4]
mov dword [esp + 0x24], eax
dec eax
mov dword [0x4bd5e4], eax
mov eax, dword [0x4bd5a8]
mov dword [esp + 0x1c], ecx
movzx ecx, word [0x4bd568]
movzx eax, word [eax + 0x167a]
sub ecx, eax
mov eax, dword [ebx + 0x3e54]
mov dword [esp + 0x18], ecx
mov ecx, dword [0x4bd594]
div dword [ecx + 0x6c2c]
mov eax, dword [0x4bd5ec]
mov ecx, dword [0x4bd58c]
mov dword [esp + 0x28], edx
xor edx, edx
movzx eax, byte [eax + esi]
mov esi, dword [0x4bd5dc]
or eax, 0xe68
mov dword [esp + 0x2c], eax
mov eax, dword [ebx + 0xbe8]
div dword [ecx + esi*4]
mov ecx, dword [esp + 0x48]
dec esi
movzx eax, dx
mov dword [esp + 0x3c], eax
mov eax, dword [0x4bd5d0]
mov dword [0x4bd5dc], esi
movzx ebx, byte [eax + ecx]
mov eax, dword [0x4bd5bc]
mov ecx, dword [esp + 0x10]
movzx eax, word [ecx + eax*2 + 0x24]
cmp ebx, eax
jl 0x403cf4
mov ebp, dword [esp + 0x34]
mov esi, ebx
shl esi, 4
movzx eax, word [edi]
mov edx, dword [esp + 0x4c]
imul eax, eax, 0xc
mov eax, dword [eax + edx]
mov dword [ebp + ebx*4], eax
mov eax, dword [0x4bd5e8]
mov ecx, dword [esi + eax]
lea esi, [esi + 0x10]
or ecx, dword [0x4bd5d0]
mov eax, dword [esp + 0x18]
sub ecx, 0xaa9
or ecx, dword [eax + 0x35c8]
movzx eax, word [edi]
imul eax, eax, 0xc
mov dword [eax + 0x10c6], ecx
movzx eax, word [edi]
mov ecx, dword [esp + 0x10]
mov eax, dword [edx + eax*4]
xor edx, edx
xor eax, 0x7f8
div dword [esp + 0x1c]
mov eax, dword [0x4bd5bc]
inc ebx
mov word [0x4bd57c], dx
movzx eax, word [ecx + eax*2 + 0x24]
cmp ebx, eax
jge 0x403c85
mov ebp, dword [0x4bd564]
movzx eax, word [edi]
xor edx, edx
mov ebx, dword [esp + 0x48]
movzx ecx, byte [ebx + eax*2]
mov eax, dword [esp + 0x20]
movzx eax, ax
div dword [0x4bd59c]
mov eax, dword [esp + 0x40]
add ecx, edx
add eax, eax
mov edx, dword [esp + 0x4c]
and ecx, dword [edx + eax*8]
movzx eax, word [0x4bd5c8]
sub eax, 0x1b2c
mov dword [0x4bd5bc], ecx
cdq
idiv dword [ebp*4 + 0x10c6]
movzx ecx, word [0x4bd5ac]
mov edx, dword [esp + 0x24]
add ecx, ecx
mov dword [edx + ecx*8 + 0x1c], eax
mov ecx, dword [0x4bd584]
imul eax, ecx, 3
movzx ebx, byte [eax + ebx + 0x1c]
cmp ebx, 0x1c77
jbe 0x403dee
mov ebp, dword [esp + 0x44]
and ecx, ebx
xor edx, edx
mov dword [0x4bd584], ecx
movzx eax, word [edi]
lea edi, [edi + 2]
add dword [ebp + eax*4], ebx
mov eax, 0xffff
add word [edi], ax
movzx ecx, word [edi]
mov eax, dword [esp + 0x38]
lea esi, [eax + ecx*4]
mov eax, dword [esp + 0x28]
movzx eax, word [eax + ecx*2]
and eax, dword [esp + 0x14]
movzx ecx, word [ecx*8 + 0x194b]
div ecx
movzx eax, word [ebx + ebx + 0xa9]
imul eax, edx
mov ecx, dword [esp + 0x2c]
cdq
idiv dword [esi]
mov dword [esi], eax
movzx eax, word [edi]
mov ax, word [ecx + eax*8]
add ax, word [esp + 0x40]
mov word [0x4bd568], ax
mov eax, dword [esp + 0x3c]
inc eax
mov dword [esp + 0x3c], eax
movzx eax, ax
xor dword [0x4bd5cc], eax
inc ebx
cmp ebx, 0x1c77
jle 0x403dee
mov ecx, dword [0x4bd584]
jmp 0x403d66
mov ecx, dword [0x4bd5d8]
xor edx, edx
mov eax, dword [esp + 0x14]
div ecx
pop edi
pop esi
dec ecx
mov eax, edx
pop ebp
mov dword [0x4bd5d8], ecx
pop ebx
add esp, 0x20
ret