Function at 0x4af040
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x30
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x44]
push edi
call fcn.00500ea0
mov byte [esp + 0x48], al
xor eax, eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x18], eax
mov eax, dword [edi + 0x148]
add esp, 4
dec eax
mov dword [esp + 0x28], eax
mov al, byte [edi + 0x116]
cmp al, 1
mov eax, dword [esp + 0x50]
je 0x4af08e
mov ecx, dword [eax + 4]
mov edx, dword [eax]
push ecx
push edx
call fcn.004b2140
add esp, 8
mov esi, eax
jmp 0x4af091
mov esi, dword [eax + 4]
mov ebp, dword [esp + 0x4c]
mov ecx, dword [esp + 0x48]
mov eax, dword [edi + 0x188]
mov ebx, esi
sub ebx, ebp
mov dword [esp + 0x30], esi
add ebx, ecx
test eax, eax
mov dword [esp + 0x34], ebx
jne 0x4af0c9
cmp dword [edi + 0x104], 1
jne 0x4af0be
push 1
jmp 0x4af0c0
push 0x40
push edi
call fcn.004af9a0
add esp, 8
cmp dword [esp + 0x48], ebp
jne 0x4af0d7
test esi, esi
je 0x4af7da
mov al, byte [esp + 0x44]
test al, al
je 0x4af14a
mov ecx, dword [edi + 4]
test byte [ecx + 0x14], 4
je 0x4af0ed
mov eax, dword [edi + 0x60]
jmp 0x4af0f3
mov edx, dword [edi + 8]
mov eax, dword [edx + 0x60]
test eax, eax
jne 0x4af14a
mov eax, dword [edi + 8]
mov edx, dword [0x57125c]
mov eax, dword [eax + 4]
add eax, 0x70
mov ecx, dword [eax]
test ecx, ecx
je 0x4af111
cmp dword [ecx + 4], edx
je 0x4af11b
push edx
push eax
call fcn.00471040
add esp, 8
test eax, eax
mov dword [0x571260], eax
je 0x4af14a
mov eax, dword [eax]
test eax, eax
je 0x4af14a
mov al, byte [eax + 0x2e]
shr eax, 4
and eax, 1
test eax, eax
je 0x4af14a
mov ecx, dword [edi + 8]
mov edx, dword [ecx + 8]
mov eax, dword [edx + 4]
test byte [eax + 0x14], 0x20
jne 0x4af7da
mov ecx, dword [esp + 0x48]
mov ebp, dword [edi + 0x188]
push ecx
push edi
mov dword [esp + 0x2c], ebp
call fcn.004aefc0
mov edx, dword [edi + 0xf4]
mov esi, eax
push edx
push edi
call fcn.004aefc0
mov dword [esp + 0x48], eax
mov al, byte [esp + 0x54]
add esp, 0x10
mov dword [esp + 0x20], esi
test al, al
mov dword [esp + 0x2c], esi
mov dword [esp + 0x10], esi
je 0x4af195
test ebx, ebx
jle 0x4af195
mov eax, dword [esp + 0x4c]
add ebx, eax
jmp 0x4af19b
mov eax, dword [esp + 0x4c]
mov ebx, eax
mov ecx, dword [esp + 0x48]
mov dword [esp + 0x18], ebx
cmp eax, ecx
jle 0x4af2d8
cmp esi, dword [edi + 0x148]
jae 0x4af2bf
mov ebx, dword [esp + 0x28]
cmp esi, ebx
jae 0x4af2d8
mov ecx, dword [esp + 0x14]
lea eax, [ebp + esi*4 + 4]
mov esi, dword [esp + 0x20]
mov edx, dword [eax]
and edx, 0x7fffffff
cmp edx, dword [esp + 0x18]
ja 0x4af1e6
inc esi
add eax, 4
inc ecx
cmp esi, ebx
jb 0x4af1cf
mov dword [esp + 0x14], ecx
mov dword [esp + 0x20], esi
mov al, byte [esp + 0x44]
test al, al
je 0x4af392
xor eax, eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x2c]
test dword [ebp + eax*4], 0x80000000
je 0x4af217
dec eax
mov dword [esp + 0x2c], eax
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x28]
mov ebx, dword [ebp + edx*4]
and ebx, 0x7fffffff
cmp eax, ecx
jae 0x4af379
lea eax, [ebp + eax*4]
mov edx, dword [eax + 4]
add eax, 4
inc esi
test edx, 0x80000000
je 0x4af24c
cmp esi, ecx
jb 0x4af239
mov ecx, dword [esp + 0x24]
mov eax, esi
mov ebp, dword [ecx + esi*4]
mov ecx, dword [esp + 0x10]
and ebp, 0x7fffffff
sub eax, ecx
mov dword [esp + 0x50], eax
jne 0x4af26c
inc eax
mov dword [esp + 0x50], eax
lea edx, [eax*4]
push edx
call sub.HCLXT.dll_Ordinal_127
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x38]
add ebp, eax
lea ecx, [esp + 0x54]
push ebp
push ebx
push 0
lea edx, [esp + 0x54]
push ecx
push edx
push edi
call fcn.004aee40
mov eax, dword [esp + 0x6c]
mov edx, dword [esp + 0x2c]
sub eax, esi
add esp, 0x1c
add eax, edx
test eax, eax
mov dword [esp + 0x1c], eax
push esi
jle 0x4af2e1
mov ebx, eax
push ebx
push 0
push edi
call fcn.004af8d0
add esp, 0x10
jmp 0x4af2f5
mov eax, dword [ebp + esi*4]
and eax, 0x7fffffff
cmp eax, ecx
jbe 0x4af2d8
cmp eax, ebx
ja 0x4af2d8
mov dword [esp + 0x14], 1
mov esi, dword [esp + 0x20]
jmp 0x4af1ee
mov eax, dword [esp + 0x20]
neg eax
push eax
push edi
call fcn.004af7f0
mov ebx, dword [esp + 0x28]
add esp, 0xc
mov edx, dword [esp + 0x10]
mov ebp, dword [esp + 0x50]
mov ecx, dword [edi + 0x188]
mov eax, 1
inc edx
cmp ebp, eax
mov dword [esp + 0x24], ecx
jle 0x4af32b
lea ecx, [ecx + edx*4]
mov edx, dword [esp + 0x44]
inc eax
add ecx, 4
mov edx, dword [edx + eax*4 - 4]
mov dword [ecx - 4], edx
mov edx, dword [esp + 0x50]
cmp eax, edx
jl 0x4af314
mov eax, dword [esp + 0x44]
push eax
call sub.HCLXT.dll_Ordinal_126
mov eax, dword [esp + 0x2c]
add esi, ebx
add eax, ebx
add esp, 4
cmp esi, eax
mov dword [esp + 0x28], eax
ja 0x4af673
mov ecx, dword [esp + 0x24]
mov edx, eax
sub edx, esi
lea ecx, [ecx + esi*4]
mov esi, dword [esp + 0x34]
inc edx
mov eax, dword [ecx]
add ecx, 4
lea ebx, [eax + esi]
xor ebx, eax
and ebx, 0x7fffffff
xor ebx, eax
dec edx
mov dword [ecx - 4], ebx
jne 0x4af35c
jmp 0x4af673
push Ordinal_1
push ebx
push edx
push 0
push 0
push edi
call fcn.004aee40
add esp, 0x18
jmp 0x4af673
mov edx, dword [esp + 0x50]
mov ecx, dword [esp + 0x48]
xor ebx, ebx
xor ebp, ebp
mov eax, dword [edx]
mov edx, dword [esp + 0x28]
cmp esi, edx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], eax
mov dword [esp + 0x50], ecx
jae 0x4af3e5
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
mov esi, dword [esp + 0x34]
sub edx, eax
lea ecx, [ecx + eax*4]
mov eax, dword [ecx + 4]
add ecx, 4
lea ebx, [eax + esi]
xor ebx, eax
and ebx, 0x7fffffff
xor ebx, eax
dec edx
mov dword [ecx], ebx
jne 0x4af3c9
mov ebx, dword [esp + 0x1c]
mov al, byte [edi + 0x116]
cmp al, 1
mov eax, dword [esp + 0x30]
lea ecx, [eax - 1]
mov dword [esp + 0x1c], ecx
jne 0x4af4fc
test eax, eax
je 0x4af63e
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x24]
lea esi, [eax + edx*4]
mov edx, dword [esp + 0x50]
mov eax, dword [esp + 0x18]
inc edx
inc eax
mov dword [esp + 0x50], edx
mov dl, byte [eax - 1]
cmp dl, 0xa
mov dword [esp + 0x18], eax
jne 0x4af4e8
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4af472
mov eax, dword [esp + 0x10]
mov edx, dword [edi + 0x148]
cmp eax, edx
jae 0x4af472
mov edx, eax
mov eax, dword [esp + 0x14]
inc edx
add esi, 4
dec eax
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0x50]
mov dword [esp + 0x14], eax
mov eax, dword [esi]
mov ecx, eax
xor ecx, edx
and ecx, 0x7fffffff
xor ecx, eax
mov dword [esi], ecx
mov ecx, dword [esp + 0x1c]
jmp 0x4af4e8
cmp ebx, ebp
jl 0x4af4cf
test ebp, ebp
jne 0x4af4b0
mov edx, dword [edi + 0x11c]
mov eax, dword [edx]
mov ax, word [eax + 0x50]
cmp ax, 1
jle 0x4af4a8
movsx eax, ax
cdq
sub eax, edx
mov ebp, eax
mov eax, ecx
cdq
sar ebp, 1
idiv ebp
mov ebp, eax
test ebp, ebp
jne 0x4af4b2
mov ebp, 1
jmp 0x4af4b2
test ecx, ecx
je 0x4af4a1
mov ebp, ecx
jmp 0x4af4b2
add ebp, ebp
mov edx, dword [esp + 0x44]
lea ecx, [ebp*4]
push ecx
push edx
call sub.HCLXT.dll_Ordinal_130
mov ecx, dword [esp + 0x24]
add esp, 8
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x44]
mov edx, dword [eax + ebx*4]
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0x50]
and edx, 0x7fffffff
mov dword [eax + ebx*4], edx
inc ebx
mov eax, ecx
dec ecx
test eax, eax
mov dword [esp + 0x1c], ecx
jne 0x4af411
jmp 0x4af625
test eax, eax
je 0x4af63e
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x24]
lea esi, [eax + edx*4]
movsx ecx, byte [edi + 0x116]
mov edx, dword [esp + 0x18]
push ecx
push edx
call dword [sym.imp.MSVCR80.dll_mblen]
add esp, 8
test eax, eax
jl 0x4af625
mov edx, dword [esp + 0x50]
inc edx
cmp eax, 1
mov dword [esp + 0x50], edx
jne 0x4af60e
mov ecx, dword [esp + 0x18]
cmp byte [ecx], 0xa
jne 0x4af60e
mov eax, dword [esp + 0x14]
inc ecx
test eax, eax
mov dword [esp + 0x18], ecx
je 0x4af591
mov edx, dword [esp + 0x10]
mov eax, dword [edi + 0x148]
cmp edx, eax
jae 0x4af591
mov eax, dword [esp + 0x14]
inc edx
add esi, 4
dec eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], edx
mov eax, dword [esi]
mov edx, dword [esp + 0x50]
mov ecx, eax
xor ecx, edx
and ecx, 0x7fffffff
xor ecx, eax
mov dword [esi], ecx
jmp 0x4af612
cmp ebx, ebp
jl 0x4af5f3
test ebp, ebp
jne 0x4af5d8
mov edx, dword [edi + 0x11c]
mov eax, dword [edx]
mov ax, word [eax + 0x50]
cmp ax, 1
jle 0x4af5c9
movsx eax, ax
cdq
sub eax, edx
mov ecx, eax
mov eax, dword [esp + 0x1c]
cdq
sar ecx, 1
idiv ecx
mov ebp, eax
test ebp, ebp
jne 0x4af5da
mov ebp, 1
jmp 0x4af5da
mov ebp, dword [esp + 0x1c]
test ebp, ebp
jne 0x4af5da
mov ebp, 1
jmp 0x4af5da
add ebp, ebp
mov eax, dword [esp + 0x44]
lea edx, [ebp*4]
push edx
push eax
call sub.HCLXT.dll_Ordinal_130
add esp, 8
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x44]
mov edx, dword [esp + 0x50]
and edx, 0x7fffffff
mov ecx, dword [eax + ebx*4]
mov dword [eax + ebx*4], edx
mov dword [esp + 0x3c], ecx
inc ebx
jmp 0x4af612
add dword [esp + 0x18], eax
mov eax, dword [esp + 0x1c]
mov ecx, eax
dec eax
test ecx, ecx
mov dword [esp + 0x1c], eax
jne 0x4af50f
test ebx, ebx
je 0x4af63e
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x44]
inc edx
push edx
push ebx
push eax
push edi
call fcn.004af8d0
add esp, 0x10
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4af658
mov ecx, dword [esp + 0x20]
mov edx, eax
inc ecx
push ecx
push edx
push edi
call fcn.004af7f0
add esp, 0xc
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x44]
sub ebx, ecx
test eax, eax
mov dword [esp + 0x1c], ebx
je 0x4af673
push eax
call sub.HCLXT.dll_Ordinal_126
add esp, 4
mov al, byte [esp + 0x54]
test al, al
je 0x4af7da
mov eax, dword [edi + 0xf4]
mov esi, dword [esp + 0x48]
mov ebx, dword [esp + 0x4c]
cmp esi, eax
jge 0x4af777
cmp ebx, eax
jge 0x4af6b3
mov ecx, dword [esp + 0x1c]
mov edx, dword [edi + 0x14c]
add edx, ecx
mov dword [edi + 0x14c], edx
mov edx, dword [esp + 0x34]
add eax, edx
jmp 0x4af71e
mov edx, dword [esp + 0x1c]
test edx, edx
jge 0x4af6c7
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x2c]
sub eax, ecx
jmp 0x4af6d3
mov ecx, dword [esp + 0x2c]
mov ebp, dword [esp + 0x38]
mov eax, ecx
sub eax, ebp
add eax, edx
mov edx, dword [edi + 0x14c]
add edx, eax
add eax, ecx
test eax, eax
mov dword [edi + 0x14c], edx
jg 0x4af6f5
mov dword [edi + 0x134], 0
jmp 0x4af724
mov ecx, dword [esp + 0x28]
cmp eax, ecx
jbe 0x4af712
mov eax, dword [esp + 0x24]
mov ecx, dword [eax + ecx*4]
and ecx, 0x7fffffff
mov dword [edi + 0x134], ecx
jmp 0x4af724
mov edx, dword [esp + 0x24]
mov eax, dword [edx + eax*4]
and eax, 0x7fffffff
mov dword [edi + 0x134], eax
mov eax, dword [edi + 0x134]
mov ecx, dword [edi + 0x12c]
cmp ecx, eax
mov dword [edi + 0xf4], eax
jl 0x4af73c
mov ecx, eax
push eax
push edi
mov dword [edi + 0x12c], ecx
call fcn.004aefc0
add esp, 8
mov dword [edi + 0x14c], eax
test eax, eax
jge 0x4af760
mov dword [edi + 0x14c], 0
mov eax, dword [edi + 0x148]
mov ecx, dword [edi + 0x14c]
cmp ecx, eax
jle 0x4af777
dec eax
mov dword [edi + 0x14c], eax
mov eax, dword [edi + 0x148]
mov ecx, dword [edi + 0x190]
cmp ecx, eax
jbe 0x4af78d
mov dword [edi + 0x190], eax
mov eax, dword [edi + 0xfc]
cmp esi, eax
jge 0x4af7da
mov ecx, dword [edi + 0x118]
test ecx, ecx
jne 0x4af7da
cmp eax, ebx
jge 0x4af7c6
mov ecx, dword [esp + 0x30]
mov edx, eax
sub edx, esi
cmp edx, ecx
jle 0x4af7d0
lea eax, [ecx + esi]
push eax
push edi
call fcn.004b2a60
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret
mov edx, dword [esp + 0x30]
sub eax, ebx
add eax, edx
add eax, esi
push eax
push edi
call fcn.004b2a60
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret