Function at 0x464140
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4b8
mov dword [ebp - 0x94], edx
lea edx, [ebp - 0xb8]
push esi
mov esi, ecx
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x9c], 0xff
call fcn.00463c30
test eax, eax
je 0x46419f
mov eax, dword [esi + 4]
mov dword [ebp - 0x64], eax
cdq
mov ecx, eax
xor ecx, edx
sub ecx, edx
mov dword [ebp - 0x1c], ecx
mov dword [esi + 4], ecx
cmp ecx, 0x1000000
jbe 0x4641a6
mov eax, dword fs:[0x2c]
mov eax, dword [eax]
mov dword [eax + 0xc], str.too_large
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [esi]
mov dword [ebp - 0x40], eax
cmp eax, 0x1000000
ja 0x46418d
mov eax, dword [ebp - 0xac]
mov edx, dword [ebp - 0x98]
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0xa8]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0xa4]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0xa0]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x9c]
push ebx
mov ebx, dword [ebp - 0xb8]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0xb0]
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x50], edx
mov dword [ebp - 0x20], ebx
push edi
mov edi, dword [ebp - 0xb4]
mov dword [ebp - 0x4c], edi
cmp eax, 0xc
jne 0x464229
cmp ebx, 0x18
jge 0x46423e
mov ecx, edi
mov eax, 0x55555556
sub ecx, edx
sub ecx, 0x18
imul ecx
mov ecx, dword [ebp - 0x1c]
mov ebx, edx
shr ebx, 0x1f
add ebx, edx
jmp 0x464237
cmp ebx, 0x10
jge 0x46423e
mov ebx, edi
sub ebx, edx
sub ebx, eax
sar ebx, 2
mov dword [ebp - 0xc], ebx
test ebx, ebx
jne 0x46426f
mov eax, dword [esi + 0xac]
sub eax, dword [esi + 0xb4]
add eax, dword [esi + 0xa8]
cmp edi, eax
je 0x46426f
mov eax, dword fs:[0x2c]
pop edi
pop ebx
pop esi
mov eax, dword [eax]
mov dword [eax + 0xc], str.bad_offset
xor eax, eax
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x20], 0x18
mov edx, dword [ebp - 0x18]
jne 0x464287
cmp edx, 0xff000000
jne 0x464287
mov eax, 3
jmp 0x464291
xor eax, eax
test edx, edx
setne al
add eax, 3
mov ebx, dword [ebp - 0x40]
mov dword [esi + 8], eax
test ebx, ebx
js 0x465349
jne 0x4642aa
lea edi, [ebx*4]
jmp 0x4642ca
mov eax, 0x7fffffff
cdq
idiv ebx
cmp eax, 4
jl 0x465349
lea edi, [ebx*4]
test edi, edi
js 0x465349
test ecx, ecx
js 0x465349
je 0x4642e4
mov eax, 0x7fffffff
cdq
idiv ecx
cmp edi, eax
jg 0x465349
test ebx, ebx
je 0x4642f9
mov eax, 0x7fffffff
cdq
idiv ebx
cmp eax, 4
jl 0x46532e
lea edi, [ebx*4]
test ecx, ecx
je 0x464314
mov eax, 0x7fffffff
cdq
idiv ecx
cmp edi, eax
jg 0x46532e
imul ecx, ebx
lea eax, [ecx*4]
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov ebx, eax
add esp, 4
mov dword [ebp - 0x24], ebx
test ebx, ebx
je 0x46532e
xor edi, edi
cmp dword [ebp - 0x20], 0x10
jge 0x464b12
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x464aed
cmp eax, 0x100
jg 0x464aed
mov dword [ebp - 0x10], edi
test eax, eax
jle 0x4645af
lea edx, [esi + 0xac]
lea ebx, [esi + 0x20]
nop dword [eax + eax]
mov eax, dword [edx]
mov ecx, dword [esi + 0xb0]
cmp eax, ecx
jae 0x46438a
mov dl, byte [eax]
inc eax
mov byte [ebp - 1], dl
lea edx, [esi + 0xac]
jmp 0x4643e7
cmp dword [esi + 0x20], 0
lea ebx, [esi + 0x20]
je 0x464458
push dword [esi + 0x24]
mov eax, dword [esi + 0x10]
lea edi, [esi + 0x28]
push edi
push dword [esi + 0x1c]
call eax
mov ecx, dword [esi + 0xac]
lea edx, [esi + 0xac]
sub ecx, dword [esi + 0xb4]
add esp, 0xc
add dword [esi + 0xa8], ecx
test eax, eax
jne 0x4643d4
lea ecx, [esi + 0x29]
mov dword [ebx], eax
mov dword [esi + 0xb0], ecx
mov byte [edi], al
jmp 0x4643df
lea ecx, [esi + 0x28]
add ecx, eax
mov dword [esi + 0xb0], ecx
mov al, byte [edi]
mov byte [ebp - 1], al
lea eax, [edi + 1]
mov dword [ebp - 0x30], edx
mov edi, eax
mov dword [edx], edi
mov edi, dword [ebp - 0x10]
mov dl, byte [ebp - 1]
lea edi, [ebp + edi*4 - 0x4b8]
mov dword [ebp - 8], ecx
mov dword [ebp - 0x14], ebx
mov byte [edi + 2], dl
cmp eax, ecx
jb 0x46447f
cmp dword [ebx], 0
je 0x4644a6
push dword [esi + 0x24]
mov eax, dword [esi + 0x10]
lea ecx, [esi + 0x28]
push ecx
push dword [esi + 0x1c]
call eax
mov ecx, dword [esi + 0xac]
add esp, 0xc
sub ecx, dword [esi + 0xb4]
add dword [esi + 0xa8], ecx
mov dword [ebp - 0x1c], eax
lea eax, [esi + 0x28]
mov ecx, dword [ebp - 0x1c]
mov dword [esi + 0xac], eax
test ecx, ecx
jne 0x46446b
mov dword [ebx], ecx
lea ecx, [esi + 0x29]
mov dword [esi + 0xb0], ecx
mov byte [eax], 0
jmp 0x464476
mov edi, dword [ebp - 0x10]
lea edi, [ebp + edi*4 - 0x4b8]
mov dword [ebp - 0x14], ebx
mov byte [edi + 2], 0
jmp 0x464408
add ecx, 0x28
add ecx, esi
mov dword [esi + 0xb0], ecx
mov eax, dword [esi + 0xac]
mov dword [ebp - 8], ecx
mov dl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
mov byte [ebp - 1], dl
mov byte [edi + 1], dl
cmp eax, ecx
jae 0x4644ac
mov cl, byte [eax]
lea ebx, [esi + 0x20]
inc eax
mov byte [ebp - 1], cl
mov ecx, dword [ebp - 8]
mov dword [esi + 0xac], eax
jmp 0x464520
mov byte [edi + 1], 0
jmp 0x4644af
mov ecx, dword [ebp - 8]
cmp dword [ebx], 0
je 0x46451c
push dword [esi + 0x24]
mov eax, dword [esi + 0x10]
lea ecx, [esi + 0x28]
push ecx
push dword [esi + 0x1c]
call eax
mov ecx, dword [esi + 0xac]
add esp, 0xc
sub ecx, dword [esi + 0xb4]
add dword [esi + 0xa8], ecx
lea ecx, [esi + 0x28]
mov dword [esi + 0xac], ecx
test eax, eax
jne 0x4644fd
mov eax, dword [ebp - 0x14]
lea ecx, [esi + 0x29]
mov dword [esi + 0xb0], ecx
mov dword [eax], 0
mov byte [esi + 0x28], 0
jmp 0x464508
lea ecx, [esi + 0x28]
add ecx, eax
mov dword [esi + 0xb0], ecx
mov eax, dword [esi + 0xac]
mov dl, byte [eax]
inc eax
mov byte [ebp - 1], dl
mov dword [esi + 0xac], eax
jmp 0x464520
mov byte [ebp - 1], 0
cmp dword [ebp - 0x34], 0xc
mov dl, byte [ebp - 1]
mov byte [edi], dl
lea edx, [esi + 0xac]
je 0x464592
cmp eax, ecx
jae 0x46453a
inc eax
mov dword [edx], eax
jmp 0x464592
mov edi, dword [ebp - 0x14]
cmp dword [edi], 0
je 0x464592
push dword [esi + 0x24]
mov eax, dword [esi + 0x10]
lea ecx, [esi + 0x28]
push ecx
push dword [esi + 0x1c]
call eax
mov ecx, dword [esi + 0xac]
lea edx, [esi + 0xac]
sub ecx, dword [esi + 0xb4]
add esp, 0xc
add dword [esi + 0xa8], ecx
lea ecx, [esi + 0x28]
mov dword [edx], ecx
test eax, eax
jne 0x464585
mov dword [edi], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
mov byte [ecx], 0
jmp 0x464590
add eax, 0x28
add eax, esi
mov dword [esi + 0xb0], eax
inc dword [edx]
mov eax, dword [ebp - 0x10]
mov byte [ebp + eax*4 - 0x4b5], 0xff
inc eax
mov dword [ebp - 0x10], eax
cmp eax, dword [ebp - 0xc]
jl 0x464370
mov ebx, dword [ebp - 0x24]
xor edi, edi
mov ecx, dword [ebp - 0x4c]
xor eax, eax
cmp dword [ebp - 0x34], 0xc
setne al
add eax, 3
imul eax, dword [ebp - 0xc]
sub ecx, eax
sub ecx, dword [ebp - 0x50]
sub ecx, dword [ebp - 0x34]
je 0x464612
test ecx, ecx
jns 0x4645de
mov eax, dword [esi + 0xb0]
mov dword [esi + 0xac], eax
jmp 0x464612
cmp dword [esi + 0x10], 0
je 0x46460c
mov edx, dword [esi + 0xb0]
mov eax, edx
sub eax, dword [esi + 0xac]
cmp eax, ecx
jge 0x46460c
sub ecx, eax
mov dword [esi + 0xac], edx
mov eax, dword [esi + 0x14]
push ecx
push dword [esi + 0x1c]
call eax
add esp, 8
jmp 0x464612
add dword [esi + 0xac], ecx
mov eax, dword [ebp - 0x20]
cmp eax, 1
jne 0x464624
mov edx, dword [esi]
add edx, 7
shr edx, 3
jmp 0x46463b
cmp eax, 4
jne 0x464630
mov edx, dword [esi]
inc edx
shr edx, 1
jmp 0x46463b
cmp eax, 8
jne 0x464ac8
mov edx, dword [esi]
mov ecx, dword [esi + 4]
neg edx
and edx, 3
mov dword [ebp - 0xc], edx
cmp eax, 1
jne 0x464883
xor eax, eax
mov dword [ebp - 0x14], eax
mov eax, ecx
mov dword [ebp - 8], eax
test ecx, ecx
jle 0x465252
mov ecx, dword [esi + 0xac]
mov dword [ebp - 0x10], 7
cmp ecx, dword [esi + 0xb0]
jae 0x464681
mov al, byte [ecx]
inc ecx
mov dword [esi + 0xac], ecx
jmp 0x4646ee
cmp dword [esi + 0x20], 0
je 0x4646ec
push dword [esi + 0x24]
mov eax, dword [esi + 0x10]
lea ecx, [esi + 0x28]
push ecx
push dword [esi + 0x1c]
call eax
mov ecx, dword [esi + 0xac]
add esp, 0xc
sub ecx, dword [esi + 0xb4]
add dword [esi + 0xa8], ecx
test eax, eax
jne 0x4646d0
mov edx, dword [ebp - 0xc]
lea ecx, [esi + 0x29]
mov dword [esi + 0x20], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
mov byte [esi + 0x28], 0
mov al, byte [esi + 0x28]
mov dword [esi + 0xac], ecx
jmp 0x4646ee
mov edx, dword [ebp - 0xc]
lea ecx, [esi + 0x29]
add eax, 0x28
add eax, esi
mov dword [esi + 0xb0], eax
mov al, byte [esi + 0x28]
mov dword [esi + 0xac], ecx
jmp 0x4646ee
xor al, al
movzx eax, al
mov dword [ebp - 0x30], eax
mov eax, dword [esi]
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x18], eax
test eax, eax
jle 0x464826
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x2c], eax
nop
mov edx, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x10]
sar edx, cl
and edx, 1
movzx eax, byte [ebp + edx*4 - 0x4b8]
mov byte [edi + ebx], al
movzx eax, byte [ebp + edx*4 - 0x4b7]
mov byte [edi + ebx + 1], al
movzx eax, byte [ebp + edx*4 - 0x4b6]
mov edx, dword [ebp - 0x44]
mov ecx, edx
mov byte [edi + ebx + 2], al
mov eax, dword [ebp - 0x28]
mov byte [edi + ebx + 3], 0xff
inc eax
add edi, 4
cmp eax, dword [ebp - 0x18]
je 0x464823
sub dword [ebp - 0x10], 1
jns 0x464805
mov dword [ebp - 0x10], 7
cmp edx, dword [esi + 0xb0]
jae 0x46478e
mov al, byte [edx]
lea ecx, [edx + 1]
mov byte [ebp - 1], al
movzx edx, byte [ebp - 1]
mov eax, dword [ebp - 0x2c]
mov dword [esi + 0xac], ecx
mov dword [ebp - 0x30], edx
jmp 0x46480e
cmp dword [esi + 0x20], 0
je 0x4647f3
push dword [esi + 0x24]
mov eax, dword [esi + 0x10]
lea ecx, [esi + 0x28]
push ecx
push dword [esi + 0x1c]
call eax
mov ecx, dword [esi + 0xac]
add esp, 0xc
sub ecx, dword [esi + 0xb4]
add dword [esi + 0xa8], ecx
test eax, eax
jne 0x4647ce
mov dword [esi + 0x20], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
mov byte [esi + 0x28], 0
jmp 0x4647d9
add eax, 0x28
add eax, esi
mov dword [esi + 0xb0], eax
mov al, byte [esi + 0x28]
lea ecx, [esi + 0x29]
mov byte [ebp - 1], al
movzx edx, byte [ebp - 1]
mov dword [esi + 0xac], ecx
mov eax, dword [esi]
mov dword [ebp - 0x30], edx
jmp 0x46480e
mov eax, dword [ebp - 0x2c]
mov ecx, edx
mov byte [ebp - 1], 0
movzx edx, byte [ebp - 1]
mov dword [ebp - 0x30], edx
jmp 0x46480e
mov ecx, dword [esi + 0xac]
mov eax, dword [ebp - 0x2c]
inc dword [ebp - 0x28]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x28], eax
jl 0x464710
mov edx, dword [ebp - 0xc]
test edx, edx
je 0x46486a
cmp dword [esi + 0x10], 0
je 0x464861
mov eax, dword [esi + 0xb0]
sub eax, ecx
mov dword [ebp - 0x1c], eax
cmp eax, edx
jge 0x464861
mov eax, dword [esi + 0xb0]
mov dword [esi + 0xac], eax
mov eax, edx
sub eax, dword [ebp - 0x1c]
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x14]
call eax
mov edx, dword [ebp - 0xc]
add esp, 8
jmp 0x46486a
lea eax, [ecx + edx]
mov dword [esi + 0xac], eax
inc dword [ebp - 0x14]
mov ecx, dword [esi + 4]
mov eax, dword [ebp - 0x14]
mov dword [ebp - 8], ecx
cmp eax, ecx
jl 0x464661
jmp 0x465252
xor eax, eax
mov dword [ebp - 0x38], eax
mov eax, ecx
mov dword [ebp - 8], eax
test ecx, ecx
jle 0x465252
nop word [eax + eax]
cmp dword [esi], 0
mov dword [ebp - 0x3c], 0
jle 0x464a72
mov ecx, dword [esi + 0xac]
mov edx, dword [esi + 0xb0]
cmp ecx, edx
jae 0x4648cb
mov al, byte [ecx]
inc ecx
mov dword [esi + 0xac], ecx
jmp 0x46492e
cmp dword [esi + 0x20], 0
je 0x46492c
push dword [esi + 0x24]
mov eax, dword [esi + 0x10]
lea ecx, [esi + 0x28]
push ecx
push dword [esi + 0x1c]
call eax
mov ecx, dword [esi + 0xac]
add esp, 0xc
sub ecx, dword [esi + 0xb4]
add dword [esi + 0xa8], ecx
test eax, eax
jne 0x464913
lea edx, [esi + 0x29]
mov dword [esi + 0x20], eax
mov dword [esi + 0xb0], edx
lea ecx, [esi + 0x29]
mov byte [esi + 0x28], al
mov dword [esi + 0xac], ecx
jmp 0x46492e
lea edx, [esi + 0x28]
add edx, eax
lea ecx, [esi + 0x29]
mov dword [esi + 0xb0], edx
mov al, byte [esi + 0x28]
mov dword [esi + 0xac], ecx
jmp 0x46492e
xor al, al
cmp dword [ebp - 0x20], 4
movzx eax, al
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], 0
jne 0x46494e
mov dword [ebp - 0x10], eax
and dword [ebp - 0x10], 0xf
shr eax, 4
mov dword [ebp - 0x14], eax
movzx eax, byte [ebp + eax*4 - 0x4b8]
mov byte [edi + ebx], al
mov eax, dword [ebp - 0x14]
movzx eax, byte [ebp + eax*4 - 0x4b7]
mov byte [edi + ebx + 1], al
mov eax, dword [ebp - 0x14]
movzx eax, byte [ebp + eax*4 - 0x4b6]
mov byte [edi + ebx + 2], al
mov eax, dword [esi]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x3c]
mov byte [edi + ebx + 3], 0xff
inc eax
add edi, 4
cmp eax, dword [esi]
je 0x464a6f
cmp dword [ebp - 0x20], 8
jne 0x464a2d
cmp ecx, edx
jae 0x4649b4
mov dl, byte [ecx]
lea eax, [ecx + 1]
mov ecx, dword [ebp - 0x14]
mov dword [esi + 0xac], eax
movzx edx, dl
jmp 0x464a33
cmp dword [esi + 0x20], 0
je 0x464a23
push dword [esi + 0x24]
mov eax, dword [esi + 0x10]
lea ecx, [esi + 0x28]
push ecx
push dword [esi + 0x1c]
call eax
mov ecx, dword [esi + 0xac]
add esp, 0xc
sub ecx, dword [esi + 0xb4]
add dword [esi + 0xa8], ecx
test eax, eax
jne 0x464a05
mov dword [esi + 0x20], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
lea eax, [esi + 0x29]
mov byte [esi + 0x28], 0
mov dl, byte [esi + 0x28]
mov dword [esi + 0xac], eax
mov ecx, dword [esi]
movzx edx, dl
jmp 0x464a33
add eax, 0x28
add eax, esi
mov dword [esi + 0xb0], eax
lea eax, [esi + 0x29]
mov dl, byte [esi + 0x28]
mov dword [esi + 0xac], eax
mov ecx, dword [esi]
movzx edx, dl
jmp 0x464a33
mov ecx, dword [ebp - 0x14]
xor dl, dl
movzx edx, dl
jmp 0x464a33
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x10]
movzx eax, byte [ebp + edx*4 - 0x4b8]
mov byte [edi + ebx], al
movzx eax, byte [ebp + edx*4 - 0x4b7]
mov byte [edi + ebx + 1], al
movzx eax, byte [ebp + edx*4 - 0x4b6]
mov byte [edi + ebx + 2], al
mov eax, dword [ebp - 0x3c]
add eax, 2
mov byte [edi + ebx + 3], 0xff
add edi, 4
mov dword [ebp - 0x3c], eax
cmp eax, ecx
jl 0x4648b0
mov edx, dword [ebp - 0xc]
test edx, edx
je 0x464aaf
cmp dword [esi + 0x10], 0
je 0x464aa9
mov eax, dword [esi + 0xb0]
mov ecx, eax
sub ecx, dword [esi + 0xac]
cmp ecx, edx
jge 0x464aa9
mov dword [esi + 0xac], eax
mov eax, edx
sub eax, ecx
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x14]
call eax
mov edx, dword [ebp - 0xc]
add esp, 8
jmp 0x464aaf
add dword [esi + 0xac], edx
inc dword [ebp - 0x38]
mov ecx, dword [esi + 4]
mov eax, dword [ebp - 0x38]
mov dword [ebp - 8], ecx
cmp eax, ecx
jl 0x4648a0
jmp 0x465252
push ebx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, dword fs:[0x2c]
add esp, 4
mov eax, dword [eax]
pop edi
pop ebx
pop esi
mov dword [eax + 0xc], str.bad_bpp
xor eax, eax
mov esp, ebp
pop ebp
ret
push ebx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, dword fs:[0x2c]
add esp, 4
mov eax, dword [eax]
pop edi
pop ebx
pop esi
mov dword [eax + 0xc], str.invalid
xor eax, eax
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x4c]
sub eax, dword [ebp - 0x50]
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x28], edi
sub eax, dword [ebp - 0x34]
je 0x464ba0
test eax, eax
jns 0x464b6d
mov eax, dword [esi + 0xb0]
mov dword [esi + 0xac], eax
jmp 0x464ba0
cmp dword [esi + 0x10], edi
je 0x464b9a
mov edx, dword [esi + 0xb0]
mov ecx, edx
sub ecx, dword [esi + 0xac]
cmp ecx, eax
jge 0x464b9a
sub eax, ecx
mov dword [esi + 0xac], edx
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x14]
call eax
add esp, 8
jmp 0x464ba0
add dword [esi + 0xac], eax
mov edx, dword [ebp - 0x20]
cmp edx, 0x18
jne 0x464baf
mov eax, dword [esi]
lea eax, [eax + eax*2]
jmp 0x464bbc
cmp edx, 0x10
jne 0x464bba
mov eax, dword [esi]
add eax, eax
jmp 0x464bbc
xor eax, eax
neg eax
and eax, 3
mov dword [ebp - 0x90], eax
cmp edx, 0x18
jne 0x464bd8
mov dword [ebp - 0x28], 1
jmp 0x464dae
mov ecx, dword [ebp - 0x10]
cmp edx, 0x20
jne 0x464c10
cmp ecx, 0xff
jne 0x464c10
cmp dword [ebp - 0x2c], 0xff00
jne 0x464c10
mov eax, dword [ebp - 0x54]
cmp eax, 0xff0000
jne 0x464c10
cmp dword [ebp - 0x18], 0xff000000
jne 0x464c31
mov dword [ebp - 0x28], 2
jmp 0x464dae
xor eax, eax
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x54]
test eax, eax
je 0x465309
cmp dword [ebp - 0x2c], edi
je 0x465309
test ecx, ecx
je 0x465309
mov ecx, eax
call fcn.00463b50
sub eax, 7
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x54]
mov edx, eax
and eax, 0x55555555
shr edx, 1
and edx, 0x55555555
add edx, eax
mov eax, edx
and edx, 0x33333333
shr eax, 2
and eax, 0x33333333
add eax, edx
mov ecx, eax
shr ecx, 4
add ecx, eax
and ecx, 0xf0f0f0f
mov eax, ecx
shr eax, 8
add ecx, eax
mov eax, ecx
shr eax, 0x10
add eax, ecx
mov ecx, dword [ebp - 0x2c]
movzx eax, al
mov dword [ebp - 0x38], eax
call fcn.00463b50
sub eax, 7
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0x2c]
mov edx, eax
and eax, 0x55555555
shr edx, 1
and edx, 0x55555555
add edx, eax
mov eax, edx
and edx, 0x33333333
shr eax, 2
and eax, 0x33333333
add eax, edx
mov ecx, eax
shr ecx, 4
add ecx, eax
and ecx, 0xf0f0f0f
mov eax, ecx
shr eax, 8
add ecx, eax
mov eax, ecx
shr eax, 0x10
add eax, ecx
mov ecx, dword [ebp - 0x10]
movzx eax, al
mov dword [ebp - 0x3c], eax
call fcn.00463b50
sub eax, 7
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x10]
mov edx, eax
and eax, 0x55555555
shr edx, 1
and edx, 0x55555555
add edx, eax
mov eax, edx
and edx, 0x33333333
shr eax, 2
and eax, 0x33333333
add eax, edx
mov ecx, eax
shr ecx, 4
add ecx, eax
and ecx, 0xf0f0f0f
mov eax, ecx
shr eax, 8
add ecx, eax
mov eax, ecx
shr eax, 0x10
add eax, ecx
movzx eax, al
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x18]
call fcn.00463b50
sub eax, 7
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x18]
mov edx, eax
and eax, 0x55555555
shr edx, 1
and edx, 0x55555555
add edx, eax
mov eax, edx
and edx, 0x33333333
shr eax, 2
and eax, 0x33333333
add eax, edx
mov ecx, eax
shr ecx, 4
add ecx, eax
and ecx, 0xf0f0f0f
mov eax, ecx
shr eax, 8
add ecx, eax
mov eax, ecx
shr eax, 0x10
add eax, ecx
cmp dword [ebp - 0x38], 8
movzx eax, al
mov dword [ebp - 0x30], eax
ja 0x465309
cmp dword [ebp - 0x3c], 8
ja 0x465309
cmp dword [ebp - 0x14], 8
ja 0x465309
cmp eax, 8
ja 0x465309
mov edx, dword [ebp - 0x20]
mov ecx, dword [esi + 4]
mov dword [ebp - 0x1c], edi
mov dword [ebp - 8], ecx
test ecx, ecx
jle 0x465252
mov eax, dword [ebp - 0x58]
neg eax
mov dword [ebp - 0x70], eax
mov eax, 8
sub eax, dword [ebp - 0x38]
mov dword [ebp - 0x74], eax
mov eax, dword [ebp - 0x5c]
neg eax
mov dword [ebp - 0x78], eax
mov eax, 8
sub eax, dword [ebp - 0x3c]
mov dword [ebp - 0x7c], eax
mov eax, dword [ebp - 0x60]
neg eax
mov dword [ebp - 0x80], eax
mov eax, 8
sub eax, dword [ebp - 0x14]
mov dword [ebp - 0x84], eax
mov eax, dword [ebp - 0x44]
neg eax
mov dword [ebp - 0x88], eax
mov eax, 8
sub eax, dword [ebp - 0x30]
mov dword [ebp - 0x8c], eax
nop dword [eax]
nop dword [eax + eax]
cmp dword [ebp - 0x28], 0
mov eax, dword [esi]
mov dword [ebp - 0x40], 0
je 0x4650d2
test eax, eax
jle 0x4651fa
lea eax, [ebx + 2]
mov dword [ebp - 0x68], eax
lea edx, [esi + 0xac]
lea eax, [ebx + 1]
mov dword [ebp - 0x6c], eax
nop dword [eax]
mov ecx, dword [esi + 0xb0]
mov eax, dword [edx]
mov dword [ebp - 0xc], ecx
cmp eax, ecx
jae 0x464e6d
mov cl, byte [eax]
inc eax
mov byte [ebp - 1], cl
lea ecx, [esi + 0x20]
mov dword [ebp - 8], ecx
jmp 0x464ed2
cmp dword [esi + 0x20], 0
lea ecx, [esi + 0x20]
mov dword [ebp - 8], ecx
je 0x464ef4
push dword [esi + 0x24]
mov eax, dword [esi + 0x10]
lea ecx, [esi + 0x28]
push ecx
push dword [esi + 0x1c]
call eax
mov ecx, dword [esi + 0xac]
lea edx, [esi + 0xac]
sub ecx, dword [esi + 0xb4]
add esp, 0xc
add dword [esi + 0xa8], ecx
mov ecx, dword [ebp - 8]
test eax, eax
jne 0x464ebb
mov dword [ecx], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
mov byte [esi + 0x28], 0
jmp 0x464ec6
add eax, 0x28
add eax, esi
mov dword [esi + 0xb0], eax
mov dword [ebp - 0xc], eax
mov al, byte [esi + 0x28]
mov byte [ebp - 1], al
lea eax, [esi + 0x29]
mov ebx, eax
mov dword [ebp - 0x50], eax
mov dword [edx], ebx
mov bl, byte [ebp - 1]
mov dword [ebp - 0x4c], edx
mov edx, dword [ebp - 0x68]
mov dword [ebp - 0x34], ecx
mov byte [edx + edi], bl
cmp eax, dword [ebp - 0xc]
jae 0x464efc
mov bl, byte [eax]
mov byte [ebp - 1], bl
jmp 0x464f72
mov dword [ebp - 0x34], ecx
mov byte [edi + ebx + 2], 0
mov ebx, dword [ebp - 0x34]
cmp dword [ebx], 0
mov ebx, dword [ebp - 0x24]
je 0x464f98
push dword [esi + 0x24]
mov eax, dword [esi + 0x10]
lea ecx, [esi + 0x28]
push ecx
push dword [esi + 0x1c]
call eax
mov ecx, dword [esi + 0xac]
add esp, 0xc
sub ecx, dword [esi + 0xb4]
add dword [esi + 0xa8], ecx
lea ecx, [esi + 0x28]
mov dword [esi + 0xac], ecx
test eax, eax
jne 0x464f53
mov eax, dword [ebp - 0x34]
mov dword [eax], 0
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
mov byte [ecx], 0
jmp 0x464f5e
add eax, 0x28
add eax, esi
mov dword [esi + 0xb0], eax
mov dword [ebp - 0xc], eax
mov eax, dword [esi + 0xac]
mov cl, byte [eax]
mov byte [ebp - 1], cl
lea ecx, [esi + 0x20]
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 0x6c]
inc eax
mov bl, byte [ebp - 1]
mov dword [esi + 0xac], eax
mov byte [edx + edi], bl
cmp eax, dword [ebp - 0xc]
jae 0x464fa0
mov bl, byte [eax]
inc eax
mov byte [ebp - 1], bl
mov dword [esi + 0xac], eax
jmp 0x46501c
mov dword [ebp - 8], ecx
mov byte [ebx + edi + 1], 0
mov ebx, dword [ebp - 0x34]
cmp dword [ebx], 0
mov ebx, dword [ebp - 0x24]
je 0x465015
push dword [esi + 0x24]
mov eax, dword [esi + 0x10]
lea ecx, [esi + 0x28]
push ecx
push dword [esi + 0x1c]
call eax
mov ecx, dword [esi + 0xac]
add esp, 0xc
sub ecx, dword [esi + 0xb4]
add dword [esi + 0xa8], ecx
lea ecx, [esi + 0x28]
mov dword [esi + 0xac], ecx
test eax, eax
jne 0x464ff0
mov ecx, dword [ebp - 8]
mov dword [ecx], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
mov byte [esi + 0x28], 0
jmp 0x464ffb
add eax, 0x28
add eax, esi
mov dword [esi + 0xb0], eax
mov eax, dword [esi + 0xac]
mov cl, byte [eax]
inc eax
mov byte [ebp - 1], cl
lea ecx, [esi + 0x20]
mov dword [esi + 0xac], eax
mov dword [ebp - 8], ecx
jmp 0x46501f
mov byte [ebp - 1], 0
mov dword [ebp - 8], ecx
mov ebx, dword [ebp - 0x24]
cmp dword [ebp - 0x28], 2
mov dl, byte [ebp - 1]
mov byte [edi + ebx], dl
lea edx, [esi + 0xac]
jne 0x4650ab
cmp eax, dword [esi + 0xb0]
jae 0x465040
mov cl, byte [eax]
inc eax
mov dword [edx], eax
jmp 0x4650ae
cmp dword [ecx], 0
je 0x4650a7
push dword [esi + 0x24]
mov eax, dword [esi + 0x10]
lea ecx, [esi + 0x28]
push ecx
push dword [esi + 0x1c]
call eax
mov ecx, dword [esi + 0xac]
lea edx, [esi + 0xac]
sub ecx, dword [esi + 0xb4]
add esp, 0xc
add dword [esi + 0xa8], ecx
lea ecx, [esi + 0x28]
mov dword [edx], ecx
test eax, eax
jne 0x465093
mov ecx, dword [ebp - 8]
mov dword [ecx], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
mov byte [esi + 0x28], 0
mov eax, dword [edx]
mov cl, byte [eax]
inc eax
mov dword [edx], eax
jmp 0x4650ae
add eax, 0x28
add eax, esi
mov dword [esi + 0xb0], eax
mov eax, dword [edx]
mov cl, byte [eax]
inc eax
mov dword [edx], eax
jmp 0x4650ae
xor cl, cl
jmp 0x4650ae
or cl, 0xff
movzx eax, cl
or dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x40]
inc eax
mov byte [edi + ebx + 3], cl
add edi, 4
mov dword [ebp - 0x40], eax
cmp eax, dword [esi]
jl 0x464e50
mov dword [ebp - 0xc], edi
jmp 0x4651fa
test eax, eax
jle 0x4651fa
nop word [eax + eax]
mov ecx, esi
cmp edx, 0x10
jne 0x4650ee
call fcn.0045a9c0
jmp 0x465104
call fcn.0045a9c0
mov ecx, esi
mov edi, eax
call fcn.0045a9c0
shl eax, 0x10
add eax, edi
mov edi, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x58]
mov edx, eax
and edx, dword [ebp - 0x54]
test ecx, ecx
jns 0x465117
mov ecx, dword [ebp - 0x70]
shl edx, cl
jmp 0x465119
shr edx, cl
mov ecx, dword [ebp - 0x74]
shr edx, cl
mov ecx, dword [ebp - 0x38]
imul edx, dword [ecx*4 + 0x49286c]
mov ecx, dword [ecx*4 + 0x4928b0]
sar edx, cl
mov ecx, dword [ebp - 0x5c]
mov byte [edi + ebx], dl
mov edx, eax
and edx, dword [ebp - 0x2c]
test ecx, ecx
jns 0x465148
mov ecx, dword [ebp - 0x78]
shl edx, cl
jmp 0x46514a
shr edx, cl
mov ecx, dword [ebp - 0x7c]
shr edx, cl
mov ecx, dword [ebp - 0x3c]
imul edx, dword [ecx*4 + 0x49286c]
mov ecx, dword [ecx*4 + 0x4928b0]
sar edx, cl
mov ecx, dword [ebp - 0x60]
mov byte [edi + ebx + 1], dl
mov edx, eax
and edx, dword [ebp - 0x10]
test ecx, ecx
jns 0x46517a
mov ecx, dword [ebp - 0x80]
shl edx, cl
jmp 0x46517c
shr edx, cl
mov ecx, dword [ebp - 0x84]
shr edx, cl
mov ecx, dword [ebp - 0x14]
imul edx, dword [ecx*4 + 0x49286c]
mov ecx, dword [ecx*4 + 0x4928b0]
sar edx, cl
mov ecx, dword [ebp - 0x18]
mov byte [edi + ebx + 2], dl
test ecx, ecx
je 0x4651d6
and eax, ecx
mov ecx, dword [ebp - 0x44]
test ecx, ecx
jns 0x4651b6
mov ecx, dword [ebp - 0x88]
shl eax, cl
jmp 0x4651b8
shr eax, cl
mov ecx, dword [ebp - 0x8c]
shr eax, cl
mov ecx, dword [ebp - 0x30]
imul eax, dword [ecx*4 + 0x49286c]
mov ecx, dword [ecx*4 + 0x4928b0]
sar eax, cl
jmp 0x4651db
mov eax, 0xff
mov ecx, dword [ebp - 0x40]
or dword [ebp - 0x48], eax
inc ecx
mov edx, dword [ebp - 0x20]
mov byte [edi + ebx + 3], al
add edi, 4
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x40], ecx
cmp ecx, dword [esi]
jl 0x4650e0
mov edx, dword [ebp - 0x90]
test edx, edx
je 0x46523a
cmp dword [esi + 0x10], 0
je 0x465234
mov eax, dword [esi + 0xb0]
mov ecx, eax
sub ecx, dword [esi + 0xac]
cmp ecx, edx
jge 0x465234
mov dword [esi + 0xac], eax
mov eax, edx
sub eax, ecx
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x14]
call eax
add esp, 8
jmp 0x46523a
add dword [esi + 0xac], edx
mov edx, dword [ebp - 0x1c]
mov ecx, dword [esi + 4]
inc edx
mov dword [ebp - 0x1c], edx
cmp edx, ecx
mov edx, dword [ebp - 0x20]
mov dword [ebp - 8], ecx
jl 0x464e20
cmp dword [ebp - 0x48], 0
jne 0x46527e
mov eax, dword [esi]
imul eax, ecx
mov ecx, dword [ebp - 8]
lea eax, [eax*4 - 1]
test eax, eax
js 0x465281
nop dword [eax + eax]
mov byte [ebx + eax], 0xff
sub eax, 4
jns 0x465270
mov ecx, dword [esi + 4]
jmp 0x465281
mov ecx, dword [ebp - 8]
cmp dword [ebp - 0x64], 0
jle 0x4652f1
xor edi, edi
mov edx, ecx
mov dword [ebp - 0x1c], edi
test edx, 0xfffffffe
jle 0x4652f1
mov ecx, dword [esi]
sub edx, edi
mov eax, ecx
dec edx
imul eax, edi
xor edi, edi
imul edx, ecx
lea eax, [ebx + eax*4]
mov dword [ebp - 0x64], eax
lea edx, [ebx + edx*4]
lea eax, [ecx*4]
test eax, eax
jle 0x4652dd
mov ebx, dword [ebp - 0x64]
sub ebx, edx
nop
mov al, byte [edx]
lea edx, [edx + 1]
mov cl, byte [ebx + edx - 1]
inc edi
mov byte [ebx + edx - 1], al
mov byte [edx - 1], cl
mov eax, dword [esi]
shl eax, 2
cmp edi, eax
jl 0x4652c0
mov ebx, dword [ebp - 0x24]
mov ecx, dword [esi + 4]
mov edx, ecx
mov edi, dword [ebp - 0x1c]
mov eax, edx
inc edi
sar eax, 1
mov dword [ebp - 0x1c], edi
cmp edi, eax
jl 0x465296
mov edx, dword [ebp - 0x94]
mov eax, dword [esi]
pop edi
mov dword [edx], eax
mov eax, dword [ebp + 8]
mov dword [eax], ecx
mov eax, ebx
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
push ebx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, dword fs:[0x2c]
add esp, 4
mov eax, dword [eax]
pop edi
pop ebx
pop esi
mov dword [eax + 0xc], str.bad_masks
xor eax, eax
mov esp, ebp
pop ebp
ret
mov eax, dword fs:[0x2c]
pop edi
pop ebx
pop esi
mov eax, dword [eax]
mov dword [eax + 0xc], str.outofmem
xor eax, eax
mov esp, ebp
pop ebp
ret
mov eax, dword fs:[0x2c]
pop edi
pop ebx
pop esi
mov eax, dword [eax]
mov dword [eax + 0xc], str.too_large
xor eax, eax
mov esp, ebp
pop ebp
ret