Function at 0x40a4d0
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7c
push ebx
push esi
mov esi, edx
mov edx, dword [0x1a2f9e0]
mov dword [ebp - 0x40], esi
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x18], edi
test edx, edx
je 0x40a6c4
mov ecx, dword [0x1a2f9ec]
mov eax, dword [0x1a2f9e8]
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x74], ecx
test ecx, ecx
jne 0x40a6d0
cmp eax, 0x10000000
jae 0x40a6d0
mov bl, 8
mov dword [ebp - 0x3c], eax
mov byte [ebp - 1], bl
mov dword [ebp - 0x10], eax
xor edx, edx
movzx ecx, bl
div ecx
cmp eax, 0xfc3f
jb 0x40a54c
mov eax, dword [ebp - 8]
add bl, bl
mov byte [ebp - 1], bl
jne 0x40a524
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 8]
mov byte [ebp - 1], 0xff
mov dword [ebp - 8], eax
push 0x1fe
push 0
push edi
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [edi + 0x1ff]
push 0xe01
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [edi + 0x1cd]
xor ecx, ecx
mov ebx, 0x3f
mov dword [ebp - 0x2c], ecx
mov edi, eax
mov dword [ebp - 0xc], ebx
test ebx, ebx
je 0x40a68c
cmp ebx, dword [ebp - 0x3c]
jae 0x40a68c
mov ecx, dword [esi + ecx*8]
mov dword [ebp - 0x14], ecx
cmp ecx, 0x64
ja 0x40a5bb
jne 0x40a5aa
mov ecx, dword [ebp - 8]
jmp 0x40a5b8
mov eax, 0x51eb851f
mul dword [ebp - 8]
shr edx, 5
imul ecx, edx
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp - 0x10]
lea eax, [ecx + ebx]
cmp eax, edx
ja 0x40a5c9
cmp eax, ebx
jae 0x40a5d0
mov ecx, edx
sub ecx, ebx
mov dword [ebp - 0x14], ecx
test ecx, ecx
je 0x40a68c
mov eax, ebx
mov byte [edi - 3], cl
shr eax, 8
xor edx, edx
mov byte [edi - 6], al
shr eax, 8
mov byte [edi - 5], al
shr eax, 8
mov byte [edi - 4], al
mov eax, ecx
shr eax, 8
mov ecx, 0x3f
mov byte [edi - 2], al
shr eax, 8
mov byte [edi - 1], al
shr eax, 8
mov byte [edi], al
mov al, byte [ebp + 8]
mov byte [edi - 0xb], al
mov eax, ebx
div ecx
movzx esi, byte [ebp - 1]
mov dword [ebp - 0x1c], edx
mov ecx, eax
xor edx, edx
mov byte [edi - 7], bl
div esi
xor edx, edx
mov ebx, eax
mov eax, ecx
div esi
mov eax, dword [ebp - 0x1c]
mov ecx, ebx
shr ecx, 2
inc al
and cl, 0xc0
mov byte [edi - 0xe], dl
or cl, al
mov byte [edi - 0xc], bl
mov byte [edi - 0xd], cl
xor edx, edx
mov ecx, dword [ebp - 0xc]
add ecx, dword [ebp - 0x14]
mov dword [ebp - 0xc], ecx
lea eax, [ecx - 1]
mov ecx, 0x3f
div ecx
mov ebx, edx
xor edx, edx
div esi
mov esi, dword [ebp - 0x40]
inc bl
mov ecx, eax
mov byte [edi - 0xa], dl
shr ecx, 2
and cl, 0xc0
mov byte [edi - 8], al
or cl, bl
mov ebx, dword [ebp - 0xc]
mov byte [edi - 9], cl
add edi, 0x10
mov ecx, dword [ebp - 0x2c]
inc ecx
mov dword [ebp - 0x2c], ecx
cmp ecx, 4
jb 0x40a587
mov edi, dword [ebp - 0x18]
mov ecx, dword [0x1a2f9e0]
mov word [edi + 0x1fe], 0xaa55
test ecx, ecx
je 0x40a6c4
push edi
sub esp, 8
mov edx, 0x200
push 0
push 0
call fcn.004157c0
add esp, 0x14
test eax, eax
je 0x40ae39
call fcn.00415d70
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test edx, edx
je 0x40a6c4
mov ecx, 0x200
mov dword [ebp - 0x28], ecx
call fcn.00404820
mov ebx, dword [ebp - 8]
xor edx, edx
mov ecx, dword [ebp - 0x28]
add eax, ebx
mov dword [ebp - 0x2c], eax
mov edi, 1
mov eax, 0x100000
mov dword [ebp - 0x24], edi
div ecx
xor edx, edx
mov dword [ebp - 0x5c], eax
mov eax, 0x4000
div ecx
mov edx, dword [ebp - 0xc]
sub ebx, eax
sbb edx, 0
add ebx, 0xffffffff
mov dword [ebp - 0x14], ebx
adc edx, 0xffffffff
add eax, 2
xor esi, esi
mov dword [ebp - 0x74], eax
sub ebx, eax
mov dword [ebp - 0x10], eax
mov eax, edx
mov dword [ebp - 0x4c], ebx
sbb eax, esi
mov dword [ebp - 0x48], edx
mov dword [ebp - 0x7c], eax
or ebx, 0xffffffff
xor eax, eax
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x1c], eax
nop
shl eax, 7
xor edx, edx
mov dword [ebp - 0x3c], eax
div ecx
mov eax, edx
mov dword [ebp - 0x44], eax
test eax, eax
jne 0x40a763
push ecx
push edx
push dword [ebp - 0x18]
call sub.msvcrt.dll_memset
mov ecx, dword [ebp - 0x28]
add esp, 0xc
mov eax, edi
or eax, esi
je 0x40a98f
mov esi, dword [ebp - 0x5c]
mov edx, 0
mov ecx, dword [ebp - 0x5c]
neg esi
mov eax, 0
mov dword [ebp - 0x58], esi
adc edx, edx
neg edx
add ecx, dword [ebp - 0x10]
mov dword [ebp - 0x34], edx
adc eax, dword [ebp - 0x20]
add ecx, 0xffffffff
adc eax, 0xffffffff
and ecx, esi
and eax, edx
mov edx, ecx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x10], edx
mov edi, dword [eax]
mov esi, dword [eax + 4]
add eax, 8
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x40], eax
test esi, esi
ja 0x40a864
jb 0x40a7c5
cmp edi, 0x64
ja 0x40a864
push dword [ebp - 0x7c]
push dword [ebp - 0x4c]
push esi
push edi
call fcn.00419b60
mov ecx, edx
mov edi, eax
mov edx, 0xe147ae15
mov dword [ebp - 0x24], edi
mul edx
mov eax, edi
mov dword [ebp - 0x30], ecx
mov esi, edx
mov edx, 0x47ae147a
mul edx
mov edi, eax
mov dword [ebp - 0x50], edx
mov eax, ecx
mov ecx, 0xe147ae15
mul ecx
mov dword [ebp - 0x64], edx
mov ecx, eax
mov eax, dword [ebp - 0x30]
mov edx, 0x47ae147a
mul edx
add ecx, esi
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0x6c], edx
mov edx, dword [ebp - 0x64]
adc edx, 0
mov dword [ebp - 0x54], eax
add edi, ecx
mov ecx, dword [ebp - 0x50]
mov edi, dword [ebp - 0x24]
adc ecx, 0
xor eax, eax
add edx, ecx
mov ecx, dword [ebp - 0x54]
adc eax, eax
add ecx, edx
mov edx, dword [ebp - 0x6c]
adc edx, eax
sub edi, ecx
sbb esi, edx
shrd edi, esi, 1
shr esi, 1
add edi, ecx
adc esi, edx
mov edx, dword [ebp - 0x10]
shrd edi, esi, 6
shr esi, 6
add edi, dword [ebp - 0x5c]
adc esi, 0
add edi, 0xffffffff
adc esi, 0xffffffff
and edi, dword [ebp - 0x58]
and esi, dword [ebp - 0x34]
mov dword [ebp - 0x24], edi
mov ecx, dword [ebp - 0x48]
mov eax, edi
add eax, edx
mov dword [ebp - 0x34], eax
mov eax, esi
adc eax, dword [ebp - 0x20]
cmp eax, ecx
jb 0x40a8a0
mov eax, dword [ebp - 0x14]
ja 0x40a881
cmp dword [ebp - 0x34], eax
jbe 0x40a8a0
cmp dword [ebp - 0x20], ecx
ja 0x40ae42
jb 0x40a894
cmp edx, eax
jae 0x40ae42
mov edi, eax
mov esi, ecx
sub edi, edx
mov dword [ebp - 0x24], edi
sbb esi, dword [ebp - 0x20]
mov eax, edi
or eax, esi
je 0x40a98c
mov ecx, dword [ebp - 0x44]
mov eax, dword [ebp - 0x18]
movups xmm0, xmmword [0x42a9c8]
push ecx
lea edx, [ecx + 0x10]
movups xmmword [eax + ecx], xmm0
mov ecx, dword [ebp - 0x2c]
add edx, eax
call fcn.00407750
mov edx, dword [ebp - 0x18]
add esp, 4
add edx, dword [ebp - 0x44]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x10]
mov ecx, eax
mov byte [edx + 0x20], al
mov eax, dword [ebp - 0x20]
shrd ecx, eax, 8
mov byte [edx + 0x21], cl
shr eax, 8
shrd ecx, eax, 8
mov byte [edx + 0x22], cl
shr eax, 8
shrd ecx, eax, 8
mov byte [edx + 0x23], cl
shr eax, 8
shrd ecx, eax, 8
mov byte [edx + 0x24], cl
shr eax, 8
shrd ecx, eax, 8
mov byte [edx + 0x25], cl
shr eax, 8
shrd ecx, eax, 8
mov byte [edx + 0x26], cl
shr eax, 8
shrd ecx, eax, 8
mov eax, esi
mov byte [edx + 0x27], cl
mov ecx, edi
add ecx, dword [ebp - 0x10]
mov edx, ecx
mov dword [ebp - 0x10], ecx
adc eax, dword [ebp - 0x20]
add edx, 0xffffffff
mov ecx, eax
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x18]
adc ecx, 0xffffffff
add eax, dword [ebp - 0x44]
mov edi, dword [ebp - 0x24]
mov byte [eax + 0x28], dl
shrd edx, ecx, 8
shr ecx, 8
mov byte [eax + 0x29], dl
shrd edx, ecx, 8
shr ecx, 8
mov byte [eax + 0x2a], dl
shrd edx, ecx, 8
shr ecx, 8
mov byte [eax + 0x2b], dl
shrd edx, ecx, 8
shr ecx, 8
mov byte [eax + 0x2c], dl
shrd edx, ecx, 8
shr ecx, 8
mov byte [eax + 0x2d], dl
shrd edx, ecx, 8
shr ecx, 8
mov byte [eax + 0x2e], dl
shrd edx, ecx, 8
mov byte [eax + 0x2f], dl
mov ecx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x3c]
xor edx, edx
sub eax, 0xffffff80
div ecx
test edx, edx
jne 0x40aa9c
xor eax, eax
mov dword [ebp - 0x30], eax
test ecx, ecx
je 0x40a9e9
mov edi, dword [ebp - 0x18]
nop dword [eax]
mov dh, byte [edi + eax]
mov dl, 1
test dh, dl
mov eax, 0
setne al
xor ebx, eax
mov ecx, ebx
mov eax, ebx
shr ecx, 1
mov ebx, ecx
xor ebx, 0xedb88320
test al, 1
cmove ebx, ecx
add dl, dl
jne 0x40a9b5
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x28]
inc eax
mov dword [ebp - 0x30], eax
cmp eax, ecx
jb 0x40a9b0
mov edi, dword [ebp - 0x24]
mov eax, dword [ebp - 8]
xor edx, edx
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x3c]
div ecx
mov ecx, dword [0x1a2f9e0]
xor edx, edx
mov dword [ebp - 0x34], eax
add eax, 2
test ecx, ecx
je 0x40a6c4
cmp edx, dword [0x1a2f9ec]
ja 0x40a6c4
jb 0x40aa2c
cmp eax, dword [0x1a2f9e8]
ja 0x40a6c4
push dword [ebp - 0x18]
sub esp, 8
push edx
push eax
mov edx, 0x200
call fcn.004157c0
add esp, 0x14
test eax, eax
jne 0x40a6bf
mov eax, dword [ebp - 0x34]
xor edx, edx
add eax, dword [ebp - 0x14]
mov ecx, dword [0x1a2f9e0]
adc edx, dword [ebp - 0x48]
test ecx, ecx
je 0x40a6c4
cmp edx, dword [0x1a2f9ec]
ja 0x40a6c4
jb 0x40aa7c
cmp eax, dword [0x1a2f9e8]
ja 0x40a6c4
push dword [ebp - 0x18]
sub esp, 8
push edx
push eax
mov edx, 0x200
call fcn.004157c0
add esp, 0x14
test eax, eax
jne 0x40a6bf
mov ecx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x1c]
inc eax
mov dword [ebp - 0x1c], eax
cmp eax, 0x80
jb 0x40a740
mov esi, dword [ebp - 0x18]
push ecx
push 0
push esi
call sub.msvcrt.dll_memset
movups xmm0, xmmword [0x42a91c]
mov eax, dword [ebp - 8]
not ebx
mov ecx, dword [ebp - 0xc]
movups xmmword [esi], xmm0
mov byte [esi + 0x58], bl
shr ebx, 8
mov byte [esi + 0x59], bl
shr ebx, 8
mov byte [esi + 0x5a], bl
shr ebx, 8
add eax, 0xffffffff
mov dword [ebp - 8], eax
mov edx, eax
adc ecx, 0xffffffff
mov byte [esi + 0x20], al
mov eax, ecx
mov dword [ebp - 0xc], ecx
shrd edx, eax, 8
mov edi, dword [ebp - 0x48]
shr eax, 8
mov ecx, edx
shrd ecx, eax, 8
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x58], ecx
mov byte [esi + 0x22], cl
shr eax, 8
shrd ecx, eax, 8
mov byte [esi + 0x21], dl
mov dword [ebp - 0x6c], ecx
mov byte [esi + 0x23], cl
mov edx, dword [ebp - 0x74]
shr eax, 8
shrd ecx, eax, 8
mov byte [esi + 0x28], dl
mov dword [ebp - 0x54], ecx
mov byte [esi + 0x24], cl
shr eax, 8
shrd ecx, eax, 8
mov byte [esi + 0x5b], bl
mov dword [ebp - 0x50], ecx
mov byte [esi + 0x25], cl
shr eax, 8
shrd ecx, eax, 8
mov dword [esi + 0x18], 1
mov dword [ebp - 0x64], ecx
mov byte [esi + 0x26], cl
shr eax, 8
shrd ecx, eax, 8
mov dword [esi + 0x1c], 0
mov dword [ebp - 0x4c], ecx
mov byte [esi + 0x27], cl
xor ecx, ecx
shrd edx, ecx, 8
shr ecx, 8
mov byte [esi + 0x29], dl
shrd edx, ecx, 8
shr ecx, 8
mov byte [esi + 0x2a], dl
shrd edx, ecx, 8
shr ecx, 8
mov byte [esi + 0x2b], dl
shrd edx, ecx, 8
shr ecx, 8
mov byte [esi + 0x2c], dl
shrd edx, ecx, 8
shr ecx, 8
mov byte [esi + 0x2d], dl
shrd edx, ecx, 8
shr ecx, 8
mov byte [esi + 0x2e], dl
shrd edx, ecx, 8
mov ecx, edi
mov byte [esi + 0x2f], dl
mov edx, dword [ebp - 0x14]
add edx, 0xffffffff
adc ecx, 0xffffffff
mov byte [esi + 0x30], dl
shrd edx, ecx, 8
add esp, 8
mov dword [esi + 0x54], 0x80
shr ecx, 8
mov byte [esi + 0x31], dl
shrd edx, ecx, 8
mov dword [esi + 0x50], 0x80
shr ecx, 8
mov byte [esi + 0x32], dl
shrd edx, ecx, 8
mov dword [esi + 0x48], 2
shr ecx, 8
mov byte [esi + 0x33], dl
shrd edx, ecx, 8
shr ecx, 8
mov byte [esi + 0x34], dl
shrd edx, ecx, 8
shr ecx, 8
mov byte [esi + 0x35], dl
shrd edx, ecx, 8
shr ecx, 8
mov byte [esi + 0x36], dl
shrd edx, ecx, 8
mov ecx, dword [ebp - 0x2c]
mov byte [esi + 0x37], dl
lea edx, [esi + 0x38]
call fcn.00407750
add esp, 4
or edx, 0xffffffff
xor eax, eax
mov dword [ebp - 0x1c], eax
nop dword [eax]
mov bh, byte [esi + eax]
mov bl, 1
test bh, bl
mov eax, 0
setne al
xor edx, eax
mov ecx, edx
mov eax, edx
shr ecx, 1
mov edx, ecx
xor edx, 0xedb88320
test al, 1
cmove edx, ecx
add bl, bl
jne 0x40ac35
mov eax, dword [ebp - 0x1c]
inc eax
mov dword [ebp - 0x1c], eax
cmp eax, 0x5c
jb 0x40ac30
mov ecx, dword [0x1a2f9e0]
not edx
mov byte [esi + 0x10], dl
shr edx, 8
mov byte [esi + 0x11], dl
shr edx, 8
mov byte [esi + 0x12], dl
shr edx, 8
mov byte [esi + 0x13], dl
test ecx, ecx
je 0x40a6c4
cmp dword [0x1a2f9ec], 0
jb 0x40a6c4
ja 0x40aca5
cmp dword [0x1a2f9e8], 1
jb 0x40a6c4
push esi
sub esp, 8
mov edx, 0x200
push 0
push 1
call fcn.004157c0
add esp, 0x14
test eax, eax
jne 0x40a6bf
mov eax, dword [ebp - 8]
or edx, 0xffffffff
mov byte [esi + 0x18], al
mov eax, dword [ebp - 0x34]
mov byte [esi + 0x19], al
mov eax, dword [ebp - 0x58]
mov byte [esi + 0x1a], al
mov eax, dword [ebp - 0x6c]
mov byte [esi + 0x1b], al
mov eax, dword [ebp - 0x54]
mov byte [esi + 0x1c], al
mov eax, dword [ebp - 0x50]
mov byte [esi + 0x1d], al
mov eax, dword [ebp - 0x64]
mov byte [esi + 0x1e], al
mov eax, dword [ebp - 0x4c]
mov byte [esi + 0x1f], al
mov eax, dword [ebp - 0x14]
mov byte [esi + 0x48], al
shrd eax, edi, 8
mov dword [esi + 0x20], 1
shr edi, 8
mov byte [esi + 0x49], al
shrd eax, edi, 8
mov dword [esi + 0x24], 0
shr edi, 8
mov byte [esi + 0x4a], al
shrd eax, edi, 8
mov dword [esi + 0x10], 0
shr edi, 8
mov byte [esi + 0x4b], al
shrd eax, edi, 8
shr edi, 8
mov byte [esi + 0x4c], al
shrd eax, edi, 8
shr edi, 8
mov byte [esi + 0x4d], al
shrd eax, edi, 8
shr edi, 8
mov byte [esi + 0x4e], al
shrd eax, edi, 8
xor edi, edi
mov byte [esi + 0x4f], al
mov bh, byte [esi + edi]
mov bl, 1
nop word [eax + eax]
test bh, bl
mov eax, 0
setne al
xor edx, eax
mov ecx, edx
mov eax, edx
shr ecx, 1
mov edx, ecx
xor edx, 0xedb88320
test al, 1
cmove edx, ecx
add bl, bl
jne 0x40ad60
inc edi
cmp edi, 0x5c
jb 0x40ad55
mov ecx, dword [0x1a2f9e0]
not edx
mov byte [esi + 0x10], dl
shr edx, 8
mov byte [esi + 0x11], dl
shr edx, 8
mov byte [esi + 0x12], dl
shr edx, 8
mov byte [esi + 0x13], dl
test ecx, ecx
je 0x40a6c4
mov edx, dword [ebp - 0xc]
cmp edx, dword [0x1a2f9ec]
ja 0x40a6c4
mov eax, dword [ebp - 8]
jb 0x40adce
cmp eax, dword [0x1a2f9e8]
ja 0x40a6c4
push esi
sub esp, 8
push edx
push eax
mov edx, 0x200
call fcn.004157c0
add esp, 0x14
test eax, eax
jne 0x40a6bf
mov ecx, dword [ebp - 0x28]
push ecx
push eax
push esi
call sub.msvcrt.dll_memset
movups xmm0, xmmword [0x42a9b8]
mov ecx, dword [0x1a2f9e0]
add esp, 0xc
movups xmmword [esi + 0x1be], xmm0
mov word [esi + 0x1fe], 0xaa55
test ecx, ecx
je 0x40a6c4
push esi
sub esp, 8
mov edx, 0x200
push 0
push 0
call fcn.004157c0
add esp, 0x14
test eax, eax
jne 0x40a6bf
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
xorps xmm0, xmm0
movlpd qword [ebp - 0x38], xmm0
mov edi, dword [ebp - 0x38]
mov esi, dword [ebp - 0x34]
mov dword [ebp - 0x24], edi
jmp 0x40a98c