Function at 0x46a770
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 - 0x10], 0
mov dword [ebp - 0x9c], 0xff
call fcn.0046a260
test eax, eax
je 0x46a7c9
mov eax, dword [esi + 4]
mov dword [ebp - 0x64], eax
cdq
xor eax, edx
sub eax, edx
mov dword [esi + 4], eax
cmp eax, 0x1000000
jbe 0x46a7d0
mov eax, dword fs:[0x2c]
mov eax, dword [eax]
mov dword [eax + 0x10], str.too_large
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
cmp dword [esi], 0x1000000
ja 0x46a7b7
mov eax, dword [ebp - 0xac]
mov edx, dword [ebp - 0x98]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0xa8]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0xa4]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0xa0]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x9c]
push ebx
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0xb0]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x50], edx
push edi
mov edi, dword [ebp - 0xb4]
mov dword [ebp - 0x4c], edi
cmp eax, 0xc
jne 0x46a84c
mov ebx, dword [ebp - 0xb8]
mov dword [ebp - 0x30], ebx
cmp ebx, 0x18
jge 0x46a86a
mov ecx, edi
mov eax, 0x55555556
sub ecx, edx
sub ecx, 0x18
imul ecx
mov ebx, edx
shr ebx, 0x1f
add ebx, edx
jmp 0x46a863
mov ecx, dword [ebp - 0xb8]
mov dword [ebp - 0x30], ecx
cmp ecx, 0x10
jge 0x46a86a
mov ebx, edi
sub ebx, edx
sub ebx, eax
sar ebx, 2
mov dword [ebp - 0x10], ebx
test ebx, ebx
jne 0x46a8e3
mov ecx, dword [esi + 0xa8]
sub ecx, dword [esi + 0xb4]
mov edx, dword [esi + 0xac]
add ecx, edx
lea eax, [ecx - 1]
cmp eax, 0x3ff
ja 0x46b9d0
cmp edi, ecx
jl 0x46b9b5
sub edi, ecx
cmp edi, 0x400
jg 0x46b9b5
test edi, edi
je 0x46a8e3
jns 0x46a8b0
mov eax, dword [esi + 0xb0]
jmp 0x46a8dd
cmp dword [esi + 0x10], 0
je 0x46a8da
mov ecx, dword [esi + 0xb0]
mov eax, ecx
sub eax, edx
cmp eax, edi
jge 0x46a8da
sub edi, eax
mov dword [esi + 0xac], ecx
mov eax, dword [esi + 0x14]
push edi
push dword [esi + 0x1c]
call eax
add esp, 8
jmp 0x46a8e3
lea eax, [edi + edx]
mov dword [esi + 0xac], eax
cmp dword [ebp - 0x30], 0x18
mov ecx, dword [ebp - 0x1c]
jne 0x46a8fb
cmp ecx, 0xff000000
jne 0x46a8fb
mov eax, 3
jmp 0x46a905
xor eax, eax
test ecx, ecx
setne al
add eax, 3
mov dword [esi + 8], eax
mov ecx, dword [esi]
mov edi, dword [esi + 4]
test ecx, ecx
js 0x46b99a
jne 0x46a920
lea ebx, [ecx*4]
jmp 0x46a940
mov eax, 0x7fffffff
cdq
idiv ecx
cmp eax, 4
jl 0x46b99a
lea ebx, [ecx*4]
test ebx, ebx
js 0x46b99a
test edi, edi
js 0x46b99a
je 0x46a95a
mov eax, 0x7fffffff
cdq
idiv edi
cmp ebx, eax
jg 0x46b99a
test ecx, ecx
jne 0x46a967
lea ebx, [ecx*4]
jmp 0x46a989
mov eax, 0x7fffffff
cdq
idiv ecx
cmp eax, 4
jl 0x46b97f
lea edx, [ecx*4]
test edx, edx
js 0x46b97f
mov ebx, edx
test edi, edi
je 0x46a99d
mov eax, 0x7fffffff
cdq
idiv edi
cmp ebx, eax
jg 0x46b97f
imul edi, ecx
lea eax, [edi*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 0x46b97f
xor edi, edi
cmp dword [ebp - 0x30], 0x10
jge 0x46b17d
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x46b158
cmp eax, 0x100
jg 0x46b158
mov dword [ebp - 8], edi
test eax, eax
jle 0x46ac33
lea edx, [esi + 0xac]
lea ebx, [esi + 0x20]
mov eax, dword [edx]
mov ecx, dword [esi + 0xb0]
cmp eax, ecx
jae 0x46aa0e
mov dl, byte [eax]
inc eax
mov byte [ebp - 1], dl
lea edx, [esi + 0xac]
jmp 0x46aa6b
cmp dword [esi + 0x20], 0
lea ebx, [esi + 0x20]
je 0x46aadc
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 0x46aa58
lea ecx, [esi + 0x29]
mov dword [ebx], eax
mov dword [esi + 0xb0], ecx
mov byte [edi], al
jmp 0x46aa63
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 - 0x2c], edx
mov edi, eax
mov dword [edx], edi
mov edi, dword [ebp - 8]
mov dl, byte [ebp - 1]
lea edi, [ebp + edi*4 - 0x4b8]
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x14], ebx
mov byte [edi + 2], dl
cmp eax, ecx
jb 0x46ab03
cmp dword [ebx], 0
je 0x46ab2a
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 - 0x3c], eax
lea eax, [esi + 0x28]
mov ecx, dword [ebp - 0x3c]
mov dword [esi + 0xac], eax
test ecx, ecx
jne 0x46aaef
mov dword [ebx], ecx
lea ecx, [esi + 0x29]
mov dword [esi + 0xb0], ecx
mov byte [eax], 0
jmp 0x46aafa
mov edi, dword [ebp - 8]
lea edi, [ebp + edi*4 - 0x4b8]
mov dword [ebp - 0x14], ebx
mov byte [edi + 2], 0
jmp 0x46aa8c
add ecx, 0x28
add ecx, esi
mov dword [esi + 0xb0], ecx
mov eax, dword [esi + 0xac]
mov dword [ebp - 0xc], 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 0x46ab30
mov cl, byte [eax]
lea ebx, [esi + 0x20]
inc eax
mov byte [ebp - 1], cl
mov ecx, dword [ebp - 0xc]
mov dword [esi + 0xac], eax
jmp 0x46aba4
mov byte [edi + 1], 0
jmp 0x46ab33
mov ecx, dword [ebp - 0xc]
cmp dword [ebx], 0
je 0x46aba0
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 0x46ab81
mov eax, dword [ebp - 0x14]
lea ecx, [esi + 0x29]
mov dword [esi + 0xb0], ecx
mov dword [eax], 0
mov byte [esi + 0x28], 0
jmp 0x46ab8c
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 0x46aba4
mov byte [ebp - 1], 0
cmp dword [ebp - 0x18], 0xc
mov dl, byte [ebp - 1]
mov byte [edi], dl
lea edx, [esi + 0xac]
je 0x46ac16
cmp eax, ecx
jae 0x46abbe
inc eax
mov dword [edx], eax
jmp 0x46ac16
mov edi, dword [ebp - 0x14]
cmp dword [edi], 0
je 0x46ac16
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 0x46ac09
mov dword [edi], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
mov byte [ecx], 0
jmp 0x46ac14
add eax, 0x28
add eax, esi
mov dword [esi + 0xb0], eax
inc dword [edx]
mov eax, dword [ebp - 8]
mov byte [ebp + eax*4 - 0x4b5], 0xff
inc eax
mov dword [ebp - 8], eax
cmp eax, dword [ebp - 0x10]
jl 0x46a9f4
mov ebx, dword [ebp - 0x24]
xor edi, edi
mov ecx, dword [ebp - 0x4c]
xor eax, eax
cmp dword [ebp - 0x18], 0xc
setne al
add eax, 3
imul eax, dword [ebp - 0x10]
sub ecx, eax
sub ecx, dword [ebp - 0x50]
sub ecx, dword [ebp - 0x18]
je 0x46ac96
test ecx, ecx
jns 0x46ac62
mov eax, dword [esi + 0xb0]
mov dword [esi + 0xac], eax
jmp 0x46ac96
cmp dword [esi + 0x10], 0
je 0x46ac90
mov edx, dword [esi + 0xb0]
mov eax, edx
sub eax, dword [esi + 0xac]
cmp eax, ecx
jge 0x46ac90
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 0x46ac96
add dword [esi + 0xac], ecx
mov edx, dword [ebp - 0x30]
cmp edx, 1
jne 0x46aca8
mov eax, dword [esi]
add eax, 7
shr eax, 3
jmp 0x46acbf
cmp edx, 4
jne 0x46acb4
mov eax, dword [esi]
inc eax
shr eax, 1
jmp 0x46acbf
cmp edx, 8
jne 0x46b133
mov eax, dword [esi]
mov ecx, dword [esi + 4]
neg eax
and eax, 3
cmp edx, 1
mov dword [ebp - 0x34], eax
mov edx, ecx
jne 0x46af00
mov dword [ebp - 0x40], 0
test ecx, ecx
jle 0x46b8aa
nop dword [eax]
nop dword [eax + eax]
mov ecx, dword [esi + 0xac]
mov dword [ebp - 8], 7
cmp ecx, dword [esi + 0xb0]
jae 0x46ad10
mov al, byte [ecx]
inc ecx
mov dword [esi + 0xac], ecx
jmp 0x46ad77
cmp dword [esi + 0x20], 0
je 0x46ad75
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 0x46ad5c
mov dword [esi + 0x20], eax
lea ecx, [esi + 0x29]
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 0x46ad77
add eax, 0x28
lea ecx, [esi + 0x29]
add eax, esi
mov dword [esi + 0xb0], eax
mov al, byte [esi + 0x28]
mov dword [esi + 0xac], ecx
jmp 0x46ad77
xor al, al
movzx eax, al
mov dword [ebp - 0x2c], eax
mov eax, dword [esi]
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], eax
test eax, eax
jle 0x46aeaa
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x28], eax
mov edx, dword [ebp - 0x2c]
mov ecx, dword [ebp - 8]
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 - 0x20]
mov byte [edi + ebx + 3], 0xff
inc eax
add edi, 4
cmp eax, dword [ebp - 0x1c]
je 0x46aeaa
sub dword [ebp - 8], 1
jns 0x46ae8c
mov dword [ebp - 8], 7
cmp edx, dword [esi + 0xb0]
jae 0x46ae15
mov al, byte [edx]
lea ecx, [edx + 1]
mov byte [ebp - 1], al
movzx edx, byte [ebp - 1]
mov eax, dword [ebp - 0x28]
mov dword [esi + 0xac], ecx
mov dword [ebp - 0x2c], edx
jmp 0x46ae95
cmp dword [esi + 0x20], 0
je 0x46ae7a
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 0x46ae55
mov dword [esi + 0x20], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
mov byte [esi + 0x28], 0
jmp 0x46ae60
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 - 0x2c], edx
jmp 0x46ae95
mov eax, dword [ebp - 0x28]
mov ecx, edx
mov byte [ebp - 1], 0
movzx edx, byte [ebp - 1]
mov dword [ebp - 0x2c], edx
jmp 0x46ae95
mov ecx, dword [esi + 0xac]
mov eax, dword [ebp - 0x28]
inc dword [ebp - 0x20]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x20], eax
jl 0x46ad97
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x46aee7
cmp dword [esi + 0x10], 0
je 0x46aedf
mov edx, dword [esi + 0xb0]
sub edx, ecx
cmp edx, eax
jge 0x46aedf
mov ecx, dword [esi + 0xb0]
sub eax, edx
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x14]
mov dword [esi + 0xac], ecx
call eax
add esp, 8
jmp 0x46aee7
add eax, ecx
mov dword [esi + 0xac], eax
mov eax, dword [ebp - 0x40]
mov ecx, dword [esi + 4]
inc eax
mov dword [ebp - 0x40], eax
mov edx, ecx
cmp eax, ecx
jl 0x46acf0
jmp 0x46b8aa
mov dword [ebp - 0x18], 0
test ecx, ecx
jle 0x46b8aa
nop
cmp dword [esi], 0
mov dword [ebp - 0x38], 0
jle 0x46b0e2
mov ecx, dword [esi + 0xac]
mov edx, dword [esi + 0xb0]
cmp ecx, edx
jae 0x46af3b
mov al, byte [ecx]
inc ecx
mov dword [esi + 0xac], ecx
jmp 0x46af9e
cmp dword [esi + 0x20], 0
je 0x46af9c
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 0x46af83
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 0x46af9e
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 0x46af9e
xor al, al
cmp dword [ebp - 0x30], 4
movzx eax, al
mov dword [ebp - 0x14], eax
mov dword [ebp - 8], 0
jne 0x46afbe
mov dword [ebp - 8], eax
and dword [ebp - 8], 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 - 0x38]
mov byte [edi + ebx + 3], 0xff
inc eax
add edi, 4
cmp eax, dword [esi]
je 0x46b0df
cmp dword [ebp - 0x30], 8
jne 0x46b09d
cmp ecx, edx
jae 0x46b024
mov dl, byte [ecx]
lea eax, [ecx + 1]
mov ecx, dword [ebp - 0x14]
mov dword [esi + 0xac], eax
movzx edx, dl
jmp 0x46b0a3
cmp dword [esi + 0x20], 0
je 0x46b093
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 0x46b075
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 0x46b0a3
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 0x46b0a3
mov ecx, dword [ebp - 0x14]
xor dl, dl
movzx edx, dl
jmp 0x46b0a3
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 8]
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 - 0x38]
add eax, 2
mov byte [edi + ebx + 3], 0xff
add edi, 4
mov dword [ebp - 0x38], eax
cmp eax, ecx
jl 0x46af20
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x46b11d
cmp dword [esi + 0x10], 0
je 0x46b117
mov edx, dword [esi + 0xb0]
mov ecx, edx
sub ecx, dword [esi + 0xac]
cmp ecx, eax
jge 0x46b117
sub eax, ecx
mov dword [esi + 0xac], edx
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x14]
call eax
mov eax, dword [ebp - 0x34]
add esp, 8
jmp 0x46b11d
add dword [esi + 0xac], eax
mov ecx, dword [esi + 4]
mov edx, ecx
inc dword [ebp - 0x18]
cmp dword [ebp - 0x18], ecx
jl 0x46af10
jmp 0x46b8aa
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 + 0x10], 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 + 0x10], str.invalid
xor eax, eax
mov esp, ebp
pop ebp
ret
xor eax, eax
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x4c]
sub eax, dword [ebp - 0x50]
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], edi
sub eax, dword [ebp - 0x18]
je 0x46b205
test eax, eax
jns 0x46b1d2
mov eax, dword [esi + 0xb0]
mov dword [esi + 0xac], eax
jmp 0x46b205
cmp dword [esi + 0x10], edi
je 0x46b1ff
mov edx, dword [esi + 0xb0]
mov ecx, edx
sub ecx, dword [esi + 0xac]
cmp ecx, eax
jge 0x46b1ff
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 0x46b205
add dword [esi + 0xac], eax
mov ecx, dword [ebp - 0x30]
cmp ecx, 0x18
jne 0x46b214
mov eax, dword [esi]
lea eax, [eax + eax*2]
jmp 0x46b221
cmp ecx, 0x10
jne 0x46b21f
mov eax, dword [esi]
add eax, eax
jmp 0x46b221
xor eax, eax
neg eax
and eax, 3
mov dword [ebp - 0x90], eax
cmp ecx, 0x18
jne 0x46b23f
mov dword [ebp - 0x28], 1
xor eax, eax
jmp 0x46b417
mov edx, dword [ebp - 0x20]
cmp ecx, 0x20
mov ecx, dword [ebp - 8]
jne 0x46b27b
cmp ecx, 0xff
jne 0x46b27b
cmp edx, 0xff00
jne 0x46b27b
mov eax, dword [ebp - 0x34]
cmp eax, 0xff0000
jne 0x46b27b
cmp dword [ebp - 0x1c], 0xff000000
jne 0x46b29b
mov dword [ebp - 0x28], 2
xor eax, eax
jmp 0x46b417
xor eax, eax
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x46b95a
test edx, edx
je 0x46b95a
test ecx, ecx
je 0x46b95a
mov ecx, eax
call fcn.0046a180
sub eax, 7
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x34]
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 - 0x20]
movzx eax, al
mov dword [ebp - 0x38], eax
call fcn.0046a180
sub eax, 7
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0x20]
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 - 8]
movzx eax, al
mov dword [ebp - 0x14], eax
call fcn.0046a180
sub eax, 7
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 8]
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 - 0x40], eax
mov ecx, dword [ebp - 0x1c]
call fcn.0046a180
sub eax, 7
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x1c]
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 ecx, al
mov dword [ebp - 0x2c], ecx
ja 0x46b95a
cmp dword [ebp - 0x14], 8
ja 0x46b95a
mov eax, dword [ebp - 0x40]
cmp eax, 8
ja 0x46b95a
cmp ecx, 8
ja 0x46b95a
mov ecx, dword [esi + 4]
mov edx, ecx
mov dword [ebp - 0x3c], edi
test ecx, ecx
jle 0x46b8aa
mov ecx, dword [ebp - 0x58]
neg ecx
mov dword [ebp - 0x70], ecx
mov ecx, 8
sub ecx, dword [ebp - 0x38]
mov dword [ebp - 0x74], ecx
mov ecx, dword [ebp - 0x5c]
neg ecx
mov dword [ebp - 0x78], ecx
mov ecx, 8
sub ecx, dword [ebp - 0x14]
mov dword [ebp - 0x7c], ecx
mov ecx, dword [ebp - 0x60]
neg ecx
mov dword [ebp - 0x80], ecx
mov ecx, 8
sub ecx, eax
mov eax, dword [ebp - 0x44]
neg eax
mov dword [ebp - 0x84], ecx
mov dword [ebp - 0x88], eax
mov eax, 8
sub eax, dword [ebp - 0x2c]
mov dword [ebp - 0x8c], eax
nop dword [eax + eax]
cmp dword [ebp - 0x28], 0
mov eax, dword [esi]
mov dword [ebp - 0x54], 0
je 0x46b73d
test eax, eax
jle 0x46b856
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 - 0x10], ecx
cmp eax, ecx
jae 0x46b4cd
mov cl, byte [eax]
inc eax
mov byte [ebp - 1], cl
lea ecx, [esi + 0x20]
mov dword [ebp - 0xc], ecx
jmp 0x46b536
cmp dword [esi + 0x20], 0
lea ecx, [esi + 0x20]
mov dword [ebp - 0xc], ecx
je 0x46b55b
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 - 0xc]
test eax, eax
jne 0x46b51f
mov dword [ecx], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
mov byte [esi + 0x28], 0
jmp 0x46b52a
add eax, 0x28
add eax, esi
mov dword [esi + 0xb0], eax
mov dword [ebp - 0x10], 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 - 0x18], ecx
mov byte [edx + edi], bl
cmp eax, dword [ebp - 0x10]
jae 0x46b563
mov bl, byte [eax]
mov byte [ebp - 1], bl
jmp 0x46b5d9
mov dword [ebp - 0x18], ecx
mov byte [edi + ebx + 2], 0
mov ebx, dword [ebp - 0x18]
cmp dword [ebx], 0
mov ebx, dword [ebp - 0x24]
je 0x46b5ff
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 0x46b5ba
mov eax, dword [ebp - 0x18]
mov dword [eax], 0
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
mov byte [ecx], 0
jmp 0x46b5c5
add eax, 0x28
add eax, esi
mov dword [esi + 0xb0], eax
mov dword [ebp - 0x10], eax
mov eax, dword [esi + 0xac]
mov cl, byte [eax]
mov byte [ebp - 1], cl
lea ecx, [esi + 0x20]
mov dword [ebp - 0xc], 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 - 0x10]
jae 0x46b607
mov bl, byte [eax]
inc eax
mov byte [ebp - 1], bl
mov dword [esi + 0xac], eax
jmp 0x46b683
mov dword [ebp - 0xc], ecx
mov byte [ebx + edi + 1], 0
mov ebx, dword [ebp - 0x18]
cmp dword [ebx], 0
mov ebx, dword [ebp - 0x24]
je 0x46b67c
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 0x46b657
mov ecx, dword [ebp - 0xc]
mov dword [ecx], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
mov byte [esi + 0x28], 0
jmp 0x46b662
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 - 0xc], ecx
jmp 0x46b686
mov byte [ebp - 1], 0
mov dword [ebp - 0xc], 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 0x46b716
cmp eax, dword [esi + 0xb0]
jae 0x46b6ab
mov cl, byte [eax]
inc eax
mov dword [edx], eax
jmp 0x46b719
cmp dword [ecx], 0
je 0x46b712
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 0x46b6fe
mov ecx, dword [ebp - 0xc]
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 0x46b719
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 0x46b719
xor cl, cl
jmp 0x46b719
or cl, 0xff
movzx eax, cl
or dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x54]
inc eax
mov byte [edi + ebx + 3], cl
add edi, 4
mov dword [ebp - 0x54], eax
cmp eax, dword [esi]
jl 0x46b4b0
mov dword [ebp - 0x10], edi
jmp 0x46b856
test eax, eax
jle 0x46b856
mov ecx, esi
call fcn.00460ea0
cmp dword [ebp - 0x30], 0x10
je 0x46b763
mov ecx, esi
mov edi, eax
call fcn.00460ea0
shl eax, 0x10
add eax, edi
mov edi, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x58]
mov edx, eax
and edx, dword [ebp - 0x34]
test ecx, ecx
jns 0x46b776
mov ecx, dword [ebp - 0x70]
shl edx, cl
jmp 0x46b778
shr edx, cl
mov ecx, dword [ebp - 0x74]
shr edx, cl
mov ecx, dword [ebp - 0x38]
imul edx, dword [ecx*4 + 0x571684]
mov ecx, dword [ecx*4 + 0x571660]
sar edx, cl
mov ecx, dword [ebp - 0x5c]
mov byte [edi + ebx], dl
mov edx, eax
and edx, dword [ebp - 0x20]
test ecx, ecx
jns 0x46b7a7
mov ecx, dword [ebp - 0x78]
shl edx, cl
jmp 0x46b7a9
shr edx, cl
mov ecx, dword [ebp - 0x7c]
shr edx, cl
mov ecx, dword [ebp - 0x14]
imul edx, dword [ecx*4 + 0x571684]
mov ecx, dword [ecx*4 + 0x571660]
sar edx, cl
mov ecx, dword [ebp - 0x60]
mov byte [edi + ebx + 1], dl
mov edx, eax
and edx, dword [ebp - 8]
test ecx, ecx
jns 0x46b7d9
mov ecx, dword [ebp - 0x80]
shl edx, cl
jmp 0x46b7db
shr edx, cl
mov ecx, dword [ebp - 0x84]
shr edx, cl
mov ecx, dword [ebp - 0x40]
imul edx, dword [ecx*4 + 0x571684]
mov ecx, dword [ecx*4 + 0x571660]
sar edx, cl
mov ecx, dword [ebp - 0x1c]
mov byte [edi + ebx + 2], dl
test ecx, ecx
je 0x46b835
and eax, ecx
mov ecx, dword [ebp - 0x44]
test ecx, ecx
jns 0x46b815
mov ecx, dword [ebp - 0x88]
shl eax, cl
jmp 0x46b817
shr eax, cl
mov ecx, dword [ebp - 0x8c]
shr eax, cl
mov ecx, dword [ebp - 0x2c]
imul eax, dword [ecx*4 + 0x571684]
mov ecx, dword [ecx*4 + 0x571660]
sar eax, cl
jmp 0x46b83a
mov eax, 0xff
mov ecx, dword [ebp - 0x54]
or dword [ebp - 0x48], eax
inc ecx
mov byte [edi + ebx + 3], al
add edi, 4
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x54], ecx
cmp ecx, dword [esi]
jl 0x46b745
mov edx, dword [ebp - 0x90]
test edx, edx
je 0x46b896
cmp dword [esi + 0x10], 0
je 0x46b890
mov eax, dword [esi + 0xb0]
mov ecx, eax
sub ecx, dword [esi + 0xac]
cmp ecx, edx
jge 0x46b890
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 0x46b896
add dword [esi + 0xac], edx
mov eax, dword [ebp - 0x3c]
mov ecx, dword [esi + 4]
inc eax
mov dword [ebp - 0x3c], eax
mov edx, ecx
cmp eax, ecx
jl 0x46b480
cmp dword [ebp - 0x48], 0
jne 0x46b8cc
mov eax, dword [esi]
imul eax, ecx
lea eax, [eax*4 - 1]
test eax, eax
js 0x46b8cc
mov byte [ebx + eax], 0xff
sub eax, 4
jns 0x46b8c0
mov edx, dword [esi + 4]
cmp dword [ebp - 0x64], 0
jle 0x46b93f
xor edi, edi
mov dword [ebp - 0x3c], edi
test edx, 0xfffffffe
jle 0x46b93f
nop
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 0x46b92d
mov ebx, dword [ebp - 0x64]
sub ebx, edx
nop dword [eax + eax]
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 0x46b910
mov ebx, dword [ebp - 0x24]
mov edi, dword [ebp - 0x3c]
mov edx, dword [esi + 4]
inc edi
mov eax, edx
mov dword [ebp - 0x3c], edi
sar eax, 1
cmp edi, eax
jl 0x46b8e0
mov ecx, dword [ebp - 0x94]
mov eax, dword [esi]
pop edi
mov dword [ecx], eax
mov eax, dword [ebp + 8]
mov ecx, dword [esi + 4]
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 + 0x10], 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 + 0x10], 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 + 0x10], str.too_large
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 + 0x10], str.bad_offset
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 + 0x10], str.bad_header
xor eax, eax
mov esp, ebp
pop ebp
ret