Function at 0x496280
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x61c
push edi
push esi
push ebx
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x9c]
mov dword [ebp - 0x5c8], eax
mov dword [ebp - 0x5b8], 0x10
cmp dword [ebp + 0xc], 0x100
jbe 0x4962ba
mov edx, dword [esi + 0x400]
mov dword [ebp - 0x5b8], edx
lea edi, [ebp - 0x50]
xor eax, eax
cld
mov ecx, 0x11
rep stosd dword es:[edi], eax
mov dword [ebp - 0x5cc], esi
mov edi, dword [ebp + 0xc]
lea edx, [ebp - 0x50]
nop
mov ebx, dword [ebp - 0x5cc]
mov eax, dword [ebx]
shl eax, 2
inc dword [eax + edx]
add ebx, 4
mov dword [ebp - 0x5cc], ebx
dec edi
jne 0x4962d4
mov eax, dword [ebp + 0xc]
cmp dword [ebp - 0x50], eax
jne 0x496310
mov edx, dword [ebp + 0x1c]
mov dword [edx], 0
mov ecx, dword [ebp + 0x20]
mov dword [ecx], 0
xor eax, eax
jmp 0x4969a9
mov ebx, 1
cmp dword [ebp - 0x4c], 0
jne 0x49632c
lea eax, [ebp - 0x50]
mov esi, esi
inc ebx
cmp ebx, 0x10
ja 0x49632c
cmp dword [eax + ebx*4], 0
je 0x496320
mov dword [ebp - 0x5c4], ebx
mov eax, dword [ebp + 0x20]
cmp dword [eax], ebx
jae 0x49633b
mov dword [eax], ebx
mov edi, 0x10
mov ecx, dword [ebp + 0x20]
mov edx, dword [ecx]
cmp dword [ebp - 0x10], 0
jne 0x496359
lea eax, [ebp - 0x50]
mov esi, esi
dec edi
je 0x496359
cmp dword [eax + edi*4], 0
je 0x496350
mov dword [ebp - 0x5bc], edi
cmp edx, edi
jbe 0x496368
mov eax, dword [ebp + 0x20]
mov dword [eax], edi
mov dword [ebp - 0x5e0], 1
mov ecx, ebx
shl dword [ebp - 0x5e0], cl
cmp ebx, dword [ebp - 0x5bc]
jae 0x4963a6
lea eax, [ebp - 0x50]
lea esi, [esi]
mov edx, dword [eax + ebx*4]
sub dword [ebp - 0x5e0], edx
js 0x4963b9
inc ebx
mov ecx, dword [ebp - 0x5e0]
add ecx, ecx
mov dword [ebp - 0x5e0], ecx
cmp ebx, edi
jb 0x496388
lea edx, [edi*4]
mov eax, dword [edx + ebp - 0x50]
sub dword [ebp - 0x5e0], eax
jns 0x4963c4
mov eax, 2
jmp 0x4969a9
add eax, dword [ebp - 0x5e0]
mov dword [edx + ebp - 0x50], eax
xor ebx, ebx
mov dword [ebp - 0x5ac], 0
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x5cc], eax
lea ecx, [ebp - 0x5a8]
lea edx, [ebp - 0x560]
mov dword [ebp - 0x5f8], edx
lea eax, [ebp - 0x5b0]
mov dword [ebp - 0x5fc], eax
mov edx, dword [ebp - 0x5bc]
shl edx, 2
mov dword [ebp - 0x5f0], edx
dec edi
je 0x49642d
nop
mov eax, dword [ebp - 0x5cc]
add ebx, dword [eax]
mov dword [ecx], ebx
add eax, 4
mov dword [ebp - 0x5cc], eax
add ecx, 4
dec edi
jne 0x496414
mov edi, dword [ebp - 0x5f8]
xor eax, eax
cld
mov ecx, 0x120
rep stosd dword es:[edi], eax
mov dword [ebp - 0x5cc], esi
xor edi, edi
mov ecx, dword [ebp - 0x5fc]
mov esi, dword [ebp - 0x5f8]
lea esi, [esi]
mov eax, dword [ebp - 0x5cc]
mov ebx, dword [eax]
add eax, 4
mov dword [ebp - 0x5cc], eax
test ebx, ebx
je 0x49647c
lea eax, [ebx*4]
mov edx, dword [eax + ecx]
shl edx, 2
mov dword [edx + esi], edi
inc dword [eax + ecx]
inc edi
cmp edi, dword [ebp + 0xc]
jb 0x496454
mov edx, dword [ebp - 0x5fc]
mov ecx, dword [ebp - 0x5f0]
mov edx, dword [ecx + edx]
mov dword [ebp + 0xc], edx
xor edi, edi
mov dword [ebp - 0x5b0], 0
mov ebx, dword [ebp - 0x5f8]
mov dword [ebp - 0x5cc], ebx
mov dword [ebp - 0x5c0], 0xffffffff
mov eax, dword [ebp - 0x5c8]
mov dword [eax - 4], 0
mov dword [ebp - 0x5dc], 0
mov dword [ebp - 0xe0], 0
mov dword [ebp - 0x5d0], 0
mov dword [ebp - 0x5e4], 0
mov edx, dword [ebp - 0x5bc]
cmp dword [ebp - 0x5c4], edx
jg 0x496982
lea esi, [esi]
mov eax, dword [ebp - 0x5c4]
shl eax, 2
mov ecx, dword [eax + ebp - 0x50]
dec ecx
mov dword [ebp - 0x5b4], ecx
mov dword [ebp - 0x5f4], eax
cmp ecx, 0xffffffff
je 0x49696a
nop
mov ebx, dword [ebp - 0x5c0]
mov eax, dword [ebp - 0x5c8]
mov edx, dword [eax + ebx*4]
mov eax, dword [ebp - 0x5dc]
add eax, edx
cmp dword [ebp - 0x5c4], eax
jle 0x4967c1
shl ebx, 2
mov dword [ebp - 0x600], ebx
add dword [ebp - 0x5dc], edx
add dword [ebp - 0x600], 4
inc dword [ebp - 0x5c0]
mov edx, dword [ebp - 0x5bc]
mov dword [ebp - 0x5e4], edx
mov ecx, dword [ebp - 0x5dc]
sub dword [ebp - 0x5e4], ecx
mov ebx, dword [ebp + 0x20]
mov eax, dword [ebx]
mov esi, dword [ebp - 0x5e4]
cmp esi, eax
jbe 0x49658c
mov esi, eax
mov dword [ebp - 0x5e4], esi
mov ebx, dword [ebp - 0x5c4]
sub ebx, dword [ebp - 0x5dc]
mov dword [ebp - 0x604], 1
mov ecx, ebx
shl dword [ebp - 0x604], cl
mov eax, dword [ebp - 0x5b4]
inc eax
cmp dword [ebp - 0x604], eax
jbe 0x49661e
dec dword [ebp - 0x604]
mov eax, dword [ebp - 0x5b4]
sub dword [ebp - 0x604], eax
mov edx, dword [ebp - 0x5f4]
lea ecx, [edx + ebp - 0x50]
inc ebx
cmp ebx, esi
jae 0x49661e
mov eax, dword [ebp - 0x604]
add eax, eax
mov dword [ebp - 0x604], eax
add ecx, 4
mov eax, dword [ecx]
cmp dword [ebp - 0x604], eax
jbe 0x49661e
nop
sub dword [ebp - 0x604], eax
inc ebx
cmp ebx, esi
jae 0x49661e
mov edx, dword [ebp - 0x604]
add edx, edx
mov dword [ebp - 0x604], edx
add ecx, 4
mov eax, dword [ecx]
cmp edx, eax
ja 0x4965fc
mov eax, dword [ebp - 0x5dc]
add eax, ebx
cmp eax, dword [ebp - 0x5b8]
jbe 0x496644
mov ecx, dword [ebp - 0x5b8]
cmp dword [ebp - 0x5dc], ecx
jae 0x496644
mov ebx, ecx
sub ebx, dword [ebp - 0x5dc]
mov dword [ebp - 0x5e4], 1
mov ecx, ebx
shl dword [ebp - 0x5e4], cl
mov eax, dword [ebp - 0x600]
mov edx, dword [ebp - 0x5c8]
mov dword [edx + eax], ebx
cmp dword [ebp + 0x24], 0
jne 0x496684
add esp, 0xfffffff4
mov ecx, dword [ebp - 0x5e4]
lea eax, [ecx*8 + 8]
push eax
call sub.msvcrt.dll_malloc
jmp 0x49669e
add esp, 0xfffffff8
mov edx, dword [ebp - 0x5e4]
lea eax, [edx*8 + 8]
push eax
mov ecx, dword [ebp + 0x24]
push ecx
call fcn.004ba378
mov dword [ebp - 0x5d0], eax
add esp, 0x10
cmp dword [ebp - 0x5d0], 0
jne 0x4966d8
cmp dword [ebp - 0x5c0], 0
je 0x4966cd
cmp dword [ebp + 0x24], 0
jne 0x4966cd
add esp, 0xfffffff4
push dword [ebp - 0xe0]
call fcn.004969b4
mov eax, 3
jmp 0x4969a9
mov eax, dword [ebp - 0x5d0]
add eax, 8
mov edx, dword [ebp + 0x1c]
mov dword [edx], eax
mov ecx, dword [ebp - 0x5d0]
add ecx, 4
mov dword [ebp + 0x1c], ecx
mov edx, dword [ebp - 0x5d0]
mov dword [edx + 4], 0
lea ecx, [ebp - 0xe0]
mov dword [ebp - 0x5e8], ecx
mov dword [ebp - 0x5d0], eax
mov edx, dword [ebp - 0x600]
mov dword [edx + ecx], eax
mov esi, dword [ebp - 0x600]
cmp dword [ebp - 0x5c0], 0
je 0x4967a4
mov ecx, dword [ebp - 0x5fc]
mov dword [ecx + esi], edi
mov eax, dword [ebp - 0x5c8]
movzx edx, byte [eax + esi - 4]
shl edx, 8
mov eax, dword [ebp - 0x5d8]
xor ah, ah
or eax, edx
mov dword [ebp - 0x5d8], eax
lea eax, [ebx + 0x10]
mov byte [ebp - 0x5d8], al
mov edx, dword [ebp - 0x5d0]
mov dword [ebp - 0x5d4], edx
mov eax, 1
mov ecx, dword [ebp - 0x5dc]
shl eax, cl
dec eax
and eax, edi
mov ebx, dword [ebp - 0x5c8]
sub ecx, dword [ebx + esi - 4]
shr eax, cl
mov ecx, dword [ebp - 0x5c0]
mov ebx, dword [ebp - 0x5e8]
mov edx, dword [ebx + ecx*4 - 4]
mov ecx, dword [ebp - 0x5d8]
mov ebx, dword [ebp - 0x5d4]
mov dword [edx + eax*8], ecx
mov dword [edx + eax*8 + 4], ebx
mov ebx, dword [ebp - 0x5c8]
mov edx, dword [ebx + esi]
mov eax, dword [ebp - 0x5dc]
add eax, edx
cmp dword [ebp - 0x5c4], eax
jg 0x496550
mov al, byte [ebp - 0x5c4]
sub al, byte [ebp - 0x5dc]
and eax, 0xff
shl eax, 8
mov edx, dword [ebp - 0x5d8]
xor dh, dh
or edx, eax
mov dword [ebp - 0x5d8], edx
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x5f8]
lea eax, [ecx + edx*4]
cmp dword [ebp - 0x5cc], eax
jb 0x496804
mov byte [ebp - 0x5d8], 0x63
jmp 0x496864
mov ebx, dword [ebp - 0x5cc]
mov eax, dword [ebx]
cmp eax, dword [ebp + 0x10]
jae 0x496840
mov dl, 0xf
cmp eax, 0xff
ja 0x49681c
mov dl, 0x10
mov byte [ebp - 0x5d8], dl
mov edx, dword [ebp - 0x5cc]
movzx eax, word [edx]
mov word [ebp - 0x5d4], ax
add edx, 4
mov dword [ebp - 0x5cc], edx
jmp 0x496864
sub eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0x18]
mov dl, byte [ecx + eax*2]
mov byte [ebp - 0x5d8], dl
mov ebx, dword [ebp + 0x14]
movzx eax, word [ebx + eax*2]
mov word [ebp - 0x5d4], ax
add dword [ebp - 0x5cc], 4
mov ecx, dword [ebp - 0x5c4]
sub ecx, dword [ebp - 0x5dc]
mov dword [ebp - 0x604], 1
shl dword [ebp - 0x604], cl
mov ebx, edi
mov ecx, dword [ebp - 0x5dc]
shr ebx, cl
mov eax, dword [ebp - 0x5b4]
dec eax
mov dword [ebp - 0x5ec], eax
mov esi, dword [ebp - 0x5c0]
shl esi, 2
mov edx, dword [ebp - 0x5c4]
dec edx
mov dword [ebp - 0x608], edx
cmp ebx, dword [ebp - 0x5e4]
jae 0x4968df
lea esi, [esi]
mov eax, dword [ebp - 0x5d8]
mov edx, dword [ebp - 0x5d4]
mov ecx, dword [ebp - 0x5d0]
mov dword [ecx + ebx*8], eax
mov dword [ecx + ebx*8 + 4], edx
add ebx, dword [ebp - 0x604]
cmp ebx, dword [ebp - 0x5e4]
jb 0x4968b8
mov ebx, 1
mov ecx, dword [ebp - 0x608]
shl ebx, cl
test edi, ebx
je 0x4968f8
xor edi, ebx
shr ebx, 1
test edi, ebx
jne 0x4968f0
xor edi, ebx
mov eax, 1
mov ecx, dword [ebp - 0x5dc]
shl eax, cl
dec eax
and eax, edi
mov ebx, dword [ebp - 0x5fc]
cmp eax, dword [esi + ebx]
je 0x496955
mov edx, 1
mov esi, esi
dec dword [ebp - 0x5c0]
mov eax, dword [ebp - 0x5c0]
mov ecx, dword [ebp - 0x5c8]
mov eax, dword [ecx + eax*4]
sub dword [ebp - 0x5dc], eax
mov eax, edx
mov ecx, dword [ebp - 0x5dc]
shl eax, cl
dec eax
and eax, edi
mov ebx, dword [ebp - 0x5c0]
mov ecx, dword [ebp - 0x5fc]
cmp eax, dword [ecx + ebx*4]
jne 0x49691c
mov ebx, dword [ebp - 0x5ec]
mov dword [ebp - 0x5b4], ebx
cmp ebx, 0xffffffff
jne 0x496524
inc dword [ebp - 0x5c4]
mov eax, dword [ebp - 0x5bc]
cmp dword [ebp - 0x5c4], eax
jle 0x496500
mov edx, dword [ebp - 0x5c8]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x20]
mov dword [ecx], eax
xor eax, eax
cmp dword [ebp - 0x5e0], 0
je 0x4969a9
cmp dword [ebp - 0x5bc], 1
setne al
and eax, 0xff
lea esp, [ebp - 0x628]
pop ebx
pop esi
pop edi
leave
ret