Function at 0x42d860
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4bc
mov dword [ebp - 0x98], edx
lea edx, [ebp - 0xbc]
push esi
mov esi, ecx
mov dword [ebp - 0xc], 0
mov dword [ebp - 0xa0], 0xff
call fcn.0042d350
test eax, eax
je 0x42d8b9
mov eax, dword [esi + 4]
mov dword [ebp - 0x68], eax
cdq
xor eax, edx
sub eax, edx
mov dword [esi + 4], eax
cmp eax, 0x1000000
jbe 0x42d8c0
mov eax, dword fs:[0x2c]
mov eax, dword [eax]
mov dword [eax + 8], str.too_large
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
cmp dword [esi], 0x1000000
ja 0x42d8a7
mov eax, dword [ebp - 0xb0]
mov edx, dword [ebp - 0x9c]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0xac]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0xa8]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0xa4]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0xa0]
push ebx
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0xb4]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x50], edx
push edi
mov edi, dword [ebp - 0xb8]
mov dword [ebp - 0x58], edi
cmp eax, 0xc
jne 0x42d93c
mov ebx, dword [ebp - 0xbc]
mov dword [ebp - 0x34], ebx
cmp ebx, 0x18
jge 0x42d95a
mov ecx, edi
mov eax, 0x55555556
sub ecx, edx
sub ecx, 0x18
imul ecx
mov ebx, edx
shr ebx, 0x1f
add ebx, edx
jmp 0x42d953
mov ecx, dword [ebp - 0xbc]
mov dword [ebp - 0x34], ecx
cmp ecx, 0x10
jge 0x42d95a
mov ebx, edi
sub ebx, edx
sub ebx, eax
sar ebx, 2
mov dword [ebp - 0xc], ebx
test ebx, ebx
jne 0x42d9d3
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 0x42eaee
cmp edi, ecx
jl 0x42ead3
sub edi, ecx
cmp edi, 0x400
jg 0x42ead3
test edi, edi
je 0x42d9d3
jns 0x42d9a0
mov eax, dword [esi + 0xb0]
jmp 0x42d9cd
cmp dword [esi + 0x10], 0
je 0x42d9ca
mov ecx, dword [esi + 0xb0]
mov eax, ecx
sub eax, edx
cmp eax, edi
jge 0x42d9ca
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 0x42d9d3
lea eax, [edi + edx]
mov dword [esi + 0xac], eax
cmp dword [ebp - 0x34], 0x18
mov eax, dword [ebp - 0x1c]
jne 0x42d9ea
cmp eax, 0xff000000
jne 0x42d9ea
mov edx, 3
jmp 0x42d9f4
xor edx, edx
test eax, eax
setne dl
add edx, 3
mov dword [esi + 8], edx
mov ecx, dword [esi]
mov ebx, dword [esi + 4]
mov dword [ebp - 0x10], edx
test ecx, ecx
js 0x42eab8
je 0x42da1c
mov eax, DirectSoundCreate
cdq
idiv ecx
mov edx, dword [ebp - 0x10]
cmp edx, eax
jg 0x42eab8
mov edi, edx
imul edi, ecx
test edi, edi
js 0x42eab8
test ebx, ebx
js 0x42eab8
je 0x42da46
mov eax, DirectSoundCreate
cdq
idiv ebx
cmp edi, eax
jg 0x42eab8
mov edx, dword [ebp - 0x10]
test ecx, ecx
je 0x42da5d
mov eax, DirectSoundCreate
cdq
idiv ecx
mov edx, dword [ebp - 0x10]
cmp edx, eax
jg 0x42ea9d
mov edi, edx
imul edi, ecx
test ebx, ebx
je 0x42da76
mov eax, DirectSoundCreate
cdq
idiv ebx
cmp edi, eax
jg 0x42ea9d
mov eax, dword [ebp - 0x10]
imul ecx, ebx
imul eax, ecx
push eax
call fcn.00466b42
mov ebx, eax
add esp, 4
mov dword [ebp - 0x2c], ebx
test ebx, ebx
je 0x42ea9d
xor edi, edi
cmp dword [ebp - 0x34], 0x10
jge 0x42e252
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x42e22e
cmp eax, 0x100
jg 0x42e22e
mov dword [ebp - 8], edi
test eax, eax
jle 0x42dd0f
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 0x42daea
mov dl, byte [eax]
inc eax
mov byte [ebp - 1], dl
lea edx, [esi + 0xac]
jmp 0x42db47
cmp dword [esi + 0x20], 0
lea ebx, [esi + 0x20]
je 0x42dbb8
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 0x42db34
lea ecx, [esi + 0x29]
mov dword [ebx], eax
mov dword [esi + 0xb0], ecx
mov byte [edi], al
jmp 0x42db3f
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 - 0x18], edx
mov edi, eax
mov dword [edx], edi
mov edi, dword [ebp - 8]
mov dl, byte [ebp - 1]
lea edi, [ebp + edi*4 - 0x4bc]
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x24], ebx
mov byte [edi + 2], dl
cmp eax, ecx
jb 0x42dbdf
cmp dword [ebx], 0
je 0x42dc06
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 - 0x40], eax
lea eax, [esi + 0x28]
mov ecx, dword [ebp - 0x40]
mov dword [esi + 0xac], eax
test ecx, ecx
jne 0x42dbcb
mov dword [ebx], ecx
lea ecx, [esi + 0x29]
mov dword [esi + 0xb0], ecx
mov byte [eax], 0
jmp 0x42dbd6
mov edi, dword [ebp - 8]
lea edi, [ebp + edi*4 - 0x4bc]
mov dword [ebp - 0x24], ebx
mov byte [edi + 2], 0
jmp 0x42db68
add ecx, 0x28
add ecx, esi
mov dword [esi + 0xb0], ecx
mov eax, dword [esi + 0xac]
mov dword [ebp - 0x14], 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 0x42dc0c
mov cl, byte [eax]
lea ebx, [esi + 0x20]
inc eax
mov byte [ebp - 1], cl
mov ecx, dword [ebp - 0x14]
mov dword [esi + 0xac], eax
jmp 0x42dc80
mov byte [edi + 1], 0
jmp 0x42dc0f
mov ecx, dword [ebp - 0x14]
cmp dword [ebx], 0
je 0x42dc7c
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 0x42dc5d
mov eax, dword [ebp - 0x24]
lea ecx, [esi + 0x29]
mov dword [esi + 0xb0], ecx
mov dword [eax], 0
mov byte [esi + 0x28], 0
jmp 0x42dc68
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 0x42dc80
mov byte [ebp - 1], 0
cmp dword [ebp - 0x20], 0xc
mov dl, byte [ebp - 1]
mov byte [edi], dl
lea edx, [esi + 0xac]
je 0x42dcf2
cmp eax, ecx
jae 0x42dc9a
inc eax
mov dword [edx], eax
jmp 0x42dcf2
mov edi, dword [ebp - 0x24]
cmp dword [edi], 0
je 0x42dcf2
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 0x42dce5
mov dword [edi], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
mov byte [ecx], 0
jmp 0x42dcf0
add eax, 0x28
add eax, esi
mov dword [esi + 0xb0], eax
inc dword [edx]
mov eax, dword [ebp - 8]
mov byte [ebp + eax*4 - 0x4b9], 0xff
inc eax
mov dword [ebp - 8], eax
cmp eax, dword [ebp - 0xc]
jl 0x42dad0
mov ebx, dword [ebp - 0x2c]
xor edi, edi
mov ecx, dword [ebp - 0x58]
xor eax, eax
cmp dword [ebp - 0x20], 0xc
setne al
add eax, 3
imul eax, dword [ebp - 0xc]
sub ecx, eax
sub ecx, dword [ebp - 0x50]
sub ecx, dword [ebp - 0x20]
je 0x42dd72
test ecx, ecx
jns 0x42dd3e
mov eax, dword [esi + 0xb0]
mov dword [esi + 0xac], eax
jmp 0x42dd72
cmp dword [esi + 0x10], 0
je 0x42dd6c
mov edx, dword [esi + 0xb0]
mov eax, edx
sub eax, dword [esi + 0xac]
cmp eax, ecx
jge 0x42dd6c
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 0x42dd72
add dword [esi + 0xac], ecx
mov edx, dword [ebp - 0x34]
cmp edx, 1
jne 0x42dd84
mov eax, dword [esi]
add eax, 7
shr eax, 3
jmp 0x42dd9b
cmp edx, 4
jne 0x42dd90
mov eax, dword [esi]
inc eax
shr eax, 1
jmp 0x42dd9b
cmp edx, 8
jne 0x42e20a
mov eax, dword [esi]
mov ecx, dword [esi + 4]
neg eax
and eax, 3
cmp edx, 1
mov dword [ebp - 0x38], eax
mov edx, ecx
jne 0x42dfd6
mov dword [ebp - 0x44], 0
test ecx, ecx
jle 0x42e991
mov ecx, dword [esi + 0xac]
mov dword [ebp - 8], 7
cmp ecx, dword [esi + 0xb0]
jae 0x42dde0
mov al, byte [ecx]
inc ecx
mov dword [esi + 0xac], ecx
jmp 0x42de47
cmp dword [esi + 0x20], 0
je 0x42de45
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 0x42de2c
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 0x42de47
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 0x42de47
xor al, al
movzx eax, al
mov dword [ebp - 0x18], eax
mov eax, dword [esi]
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x1c], eax
test eax, eax
jle 0x42df80
mov dword [ebp - 0x48], ecx
mov dword [ebp - 0x30], eax
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 8]
sar edx, cl
and edx, 1
movzx eax, byte [ebp + edx*4 - 0x4bc]
mov byte [edi + ebx], al
movzx eax, byte [ebp + edx*4 - 0x4bb]
mov byte [edi + ebx + 1], al
movzx eax, byte [ebp + edx*4 - 0x4ba]
mov byte [edi + ebx + 2], al
add edi, 3
cmp dword [ebp - 0x10], 4
jne 0x42dea3
mov byte [edi + ebx], 0xff
inc edi
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x48]
inc eax
mov ecx, edx
cmp eax, dword [ebp - 0x1c]
je 0x42df80
sub dword [ebp - 8], 1
jns 0x42df62
mov dword [ebp - 8], 7
cmp edx, dword [esi + 0xb0]
jae 0x42deeb
mov al, byte [edx]
lea ecx, [edx + 1]
mov byte [ebp - 1], al
movzx edx, byte [ebp - 1]
mov eax, dword [ebp - 0x30]
mov dword [esi + 0xac], ecx
mov dword [ebp - 0x18], edx
jmp 0x42df6b
cmp dword [esi + 0x20], 0
je 0x42df50
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 0x42df2b
mov dword [esi + 0x20], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
mov byte [esi + 0x28], 0
jmp 0x42df36
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 - 0x18], edx
jmp 0x42df6b
mov eax, dword [ebp - 0x30]
mov ecx, edx
mov byte [ebp - 1], 0
movzx edx, byte [ebp - 1]
mov dword [ebp - 0x18], edx
jmp 0x42df6b
mov ecx, dword [esi + 0xac]
mov eax, dword [ebp - 0x30]
inc dword [ebp - 0x28]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x48], ecx
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x28], eax
jl 0x42de67
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x42dfbd
cmp dword [esi + 0x10], 0
je 0x42dfb5
mov edx, dword [esi + 0xb0]
sub edx, ecx
cmp edx, eax
jge 0x42dfb5
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 0x42dfbd
add eax, ecx
mov dword [esi + 0xac], eax
mov eax, dword [ebp - 0x44]
mov ecx, dword [esi + 4]
inc eax
mov dword [ebp - 0x44], eax
mov edx, ecx
cmp eax, ecx
jl 0x42ddc0
jmp 0x42e991
mov dword [ebp - 0x20], 0
test ecx, ecx
jle 0x42e991
nop word [eax + eax]
cmp dword [esi], 0
mov dword [ebp - 0x3c], 0
jle 0x42e1b9
mov ecx, dword [esi + 0xac]
mov edx, dword [esi + 0xb0]
cmp ecx, edx
jae 0x42e01b
mov al, byte [ecx]
inc ecx
mov dword [esi + 0xac], ecx
jmp 0x42e07e
cmp dword [esi + 0x20], 0
je 0x42e07c
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 0x42e063
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 0x42e07e
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 0x42e07e
xor al, al
cmp dword [ebp - 0x34], 4
movzx eax, al
mov dword [ebp - 0x24], eax
mov dword [ebp - 8], 0
jne 0x42e09e
mov dword [ebp - 8], eax
and dword [ebp - 8], 0xf
shr eax, 4
mov dword [ebp - 0x24], eax
movzx eax, byte [ebp + eax*4 - 0x4bc]
mov byte [edi + ebx], al
mov eax, dword [ebp - 0x24]
movzx eax, byte [ebp + eax*4 - 0x4bb]
mov byte [edi + ebx + 1], al
mov eax, dword [ebp - 0x24]
movzx eax, byte [ebp + eax*4 - 0x4ba]
mov byte [edi + ebx + 2], al
add edi, 3
cmp dword [ebp - 0x10], 4
jne 0x42e0d5
mov byte [edi + ebx], 0xff
inc edi
mov eax, dword [ebp - 0x3c]
inc eax
cmp eax, dword [esi]
je 0x42e1b6
cmp dword [ebp - 0x34], 8
jne 0x42e171
cmp ecx, edx
jae 0x42e0ff
mov dl, byte [ecx]
lea eax, [ecx + 1]
mov dword [esi + 0xac], eax
movzx ecx, dl
jmp 0x42e174
cmp dword [esi + 0x20], 0
je 0x42e16a
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 0x42e14e
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
movzx ecx, dl
jmp 0x42e174
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
movzx ecx, dl
jmp 0x42e174
xor dl, dl
movzx ecx, dl
jmp 0x42e174
mov ecx, dword [ebp - 8]
movzx eax, byte [ebp + ecx*4 - 0x4bc]
mov byte [edi + ebx], al
movzx eax, byte [ebp + ecx*4 - 0x4bb]
mov byte [edi + ebx + 1], al
movzx eax, byte [ebp + ecx*4 - 0x4ba]
mov byte [edi + ebx + 2], al
add edi, 3
cmp dword [ebp - 0x10], 4
jne 0x42e1a5
mov byte [edi + ebx], 0xff
inc edi
mov eax, dword [ebp - 0x3c]
add eax, 2
mov dword [ebp - 0x3c], eax
cmp eax, dword [esi]
jl 0x42e000
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x42e1f4
cmp dword [esi + 0x10], 0
je 0x42e1ee
mov edx, dword [esi + 0xb0]
mov ecx, edx
sub ecx, dword [esi + 0xac]
cmp ecx, eax
jge 0x42e1ee
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 - 0x38]
add esp, 8
jmp 0x42e1f4
add dword [esi + 0xac], eax
mov ecx, dword [esi + 4]
mov edx, ecx
inc dword [ebp - 0x20]
cmp dword [ebp - 0x20], ecx
jl 0x42dff0
jmp 0x42e991
push ebx
call fcn.0046660e
mov eax, dword fs:[0x2c]
add esp, 4
mov eax, dword [eax]
pop edi
pop ebx
pop esi
mov dword [eax + 8], str.bad_bpp
xor eax, eax
mov esp, ebp
pop ebp
ret
push ebx
call fcn.0046660e
mov eax, dword fs:[0x2c]
add esp, 4
mov eax, dword [eax]
pop edi
pop ebx
pop esi
mov dword [eax + 8], str.invalid
xor eax, eax
mov esp, ebp
pop ebp
ret
xor eax, eax
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x58]
sub eax, dword [ebp - 0x50]
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0xc], edi
sub eax, dword [ebp - 0x20]
je 0x42e2da
test eax, eax
jns 0x42e2a7
mov eax, dword [esi + 0xb0]
mov dword [esi + 0xac], eax
jmp 0x42e2da
cmp dword [esi + 0x10], edi
je 0x42e2d4
mov edx, dword [esi + 0xb0]
mov ecx, edx
sub ecx, dword [esi + 0xac]
cmp ecx, eax
jge 0x42e2d4
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 0x42e2da
add dword [esi + 0xac], eax
mov ecx, dword [ebp - 0x34]
cmp ecx, 0x18
jne 0x42e2e9
mov eax, dword [esi]
lea eax, [eax + eax*2]
jmp 0x42e2f6
cmp ecx, 0x10
jne 0x42e2f4
mov eax, dword [esi]
add eax, eax
jmp 0x42e2f6
xor eax, eax
neg eax
and eax, 3
mov dword [ebp - 0x94], eax
cmp ecx, 0x18
jne 0x42e314
mov dword [ebp - 0x30], 1
xor eax, eax
jmp 0x42e4ec
mov edx, dword [ebp - 0x28]
cmp ecx, 0x20
mov ecx, dword [ebp - 8]
jne 0x42e350
cmp ecx, 0xff
jne 0x42e350
cmp edx, 0xff00
jne 0x42e350
mov eax, dword [ebp - 0x38]
cmp eax, 0xff0000
jne 0x42e350
cmp dword [ebp - 0x1c], 0xff000000
jne 0x42e370
mov dword [ebp - 0x30], 2
xor eax, eax
jmp 0x42e4ec
xor eax, eax
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x42ea79
test edx, edx
je 0x42ea79
test ecx, ecx
je 0x42ea79
mov ecx, eax
call fcn.0042d270
sub eax, 7
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0x38]
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 - 0x28]
movzx eax, al
mov dword [ebp - 0x3c], eax
call fcn.0042d270
sub eax, 7
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x28]
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 - 0x24], eax
call fcn.0042d270
sub eax, 7
mov dword [ebp - 0x64], 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 - 0x44], eax
mov ecx, dword [ebp - 0x1c]
call fcn.0042d270
sub eax, 7
mov dword [ebp - 0x48], 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 - 0x3c], 8
movzx ecx, al
mov dword [ebp - 0x18], ecx
ja 0x42ea79
cmp dword [ebp - 0x24], 8
ja 0x42ea79
mov eax, dword [ebp - 0x44]
cmp eax, 8
ja 0x42ea79
cmp ecx, 8
ja 0x42ea79
mov ecx, dword [esi + 4]
mov edx, ecx
mov dword [ebp - 0x40], edi
test ecx, ecx
jle 0x42e991
mov ecx, dword [ebp - 0x5c]
neg ecx
mov dword [ebp - 0x74], ecx
mov ecx, 8
sub ecx, dword [ebp - 0x3c]
mov dword [ebp - 0x78], ecx
mov ecx, dword [ebp - 0x60]
neg ecx
mov dword [ebp - 0x7c], ecx
mov ecx, 8
sub ecx, dword [ebp - 0x24]
mov dword [ebp - 0x80], ecx
mov ecx, dword [ebp - 0x64]
neg ecx
mov dword [ebp - 0x84], ecx
mov ecx, 8
sub ecx, eax
mov eax, dword [ebp - 0x48]
neg eax
mov dword [ebp - 0x88], ecx
mov dword [ebp - 0x8c], eax
mov eax, 8
sub eax, dword [ebp - 0x18]
mov dword [ebp - 0x90], eax
cmp dword [ebp - 0x30], 0
mov eax, dword [esi]
mov dword [ebp - 0x54], 0
je 0x42e813
test eax, eax
jle 0x42e93d
lea eax, [ebx + 2]
mov dword [ebp - 0x6c], eax
lea edx, [esi + 0xac]
lea eax, [ebx + 1]
mov dword [ebp - 0x70], eax
mov ecx, dword [esi + 0xb0]
mov eax, dword [edx]
mov dword [ebp - 0xc], ecx
cmp eax, ecx
jae 0x42e59d
mov cl, byte [eax]
inc eax
mov byte [ebp - 1], cl
lea ecx, [esi + 0x20]
mov dword [ebp - 0x14], ecx
jmp 0x42e606
cmp dword [esi + 0x20], 0
lea ecx, [esi + 0x20]
mov dword [ebp - 0x14], ecx
je 0x42e62b
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 - 0x14]
test eax, eax
jne 0x42e5ef
mov dword [ecx], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
mov byte [esi + 0x28], 0
jmp 0x42e5fa
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 - 0x58], edx
mov edx, dword [ebp - 0x6c]
mov dword [ebp - 0x20], ecx
mov byte [edx + edi], bl
cmp eax, dword [ebp - 0xc]
jae 0x42e633
mov bl, byte [eax]
mov byte [ebp - 1], bl
jmp 0x42e6a9
mov dword [ebp - 0x20], ecx
mov byte [ebx + edi + 2], 0
mov ebx, dword [ebp - 0x20]
cmp dword [ebx], 0
mov ebx, dword [ebp - 0x2c]
je 0x42e6cf
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 0x42e68a
mov eax, dword [ebp - 0x20]
mov dword [eax], 0
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
mov byte [ecx], 0
jmp 0x42e695
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 - 0x14], ecx
mov edx, dword [ebp - 0x70]
inc eax
mov bl, byte [ebp - 1]
mov dword [esi + 0xac], eax
mov byte [edx + edi], bl
cmp eax, dword [ebp - 0xc]
jae 0x42e6d7
mov bl, byte [eax]
inc eax
mov byte [ebp - 1], bl
mov dword [esi + 0xac], eax
jmp 0x42e753
mov dword [ebp - 0x14], ecx
mov byte [ebx + edi + 1], 0
mov ebx, dword [ebp - 0x20]
cmp dword [ebx], 0
mov ebx, dword [ebp - 0x2c]
je 0x42e74c
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 0x42e727
mov ecx, dword [ebp - 0x14]
mov dword [ecx], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
mov byte [esi + 0x28], 0
jmp 0x42e732
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 - 0x14], ecx
jmp 0x42e756
mov byte [ebp - 1], 0
mov dword [ebp - 0x14], ecx
mov ebx, dword [ebp - 0x2c]
mov dl, byte [ebp - 1]
mov byte [edi + ebx], dl
add edi, 3
cmp dword [ebp - 0x30], 2
lea edx, [esi + 0xac]
jne 0x42e7e9
cmp eax, dword [esi + 0xb0]
jae 0x42e77e
mov cl, byte [eax]
inc eax
mov dword [edx], eax
jmp 0x42e7ec
cmp dword [ecx], 0
je 0x42e7e5
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 0x42e7d1
mov ecx, dword [ebp - 0x14]
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 0x42e7ec
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 0x42e7ec
xor cl, cl
jmp 0x42e7ec
or cl, 0xff
movzx eax, cl
or dword [ebp - 0x4c], eax
cmp dword [ebp - 0x10], 4
jne 0x42e7fc
mov byte [edi + ebx], cl
inc edi
mov eax, dword [ebp - 0x54]
inc eax
mov dword [ebp - 0x54], eax
cmp eax, dword [esi]
jl 0x42e580
mov dword [ebp - 0xc], edi
jmp 0x42e93d
test eax, eax
jle 0x42e93d
nop dword [eax + eax]
mov ecx, esi
call fcn.00424590
cmp dword [ebp - 0x34], 0x10
je 0x42e83e
mov ecx, esi
mov edi, eax
call fcn.00424590
shl eax, 0x10
add eax, edi
mov edi, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x5c]
mov edx, eax
and edx, dword [ebp - 0x38]
test ecx, ecx
jns 0x42e851
mov ecx, dword [ebp - 0x74]
shl edx, cl
jmp 0x42e853
shr edx, cl
mov ecx, dword [ebp - 0x78]
shr edx, cl
mov ecx, dword [ebp - 0x3c]
imul edx, dword [ecx*4 + 0x4a5fd8]
mov ecx, dword [ecx*4 + 0x4a602c]
sar edx, cl
mov ecx, dword [ebp - 0x60]
mov byte [edi + ebx], dl
mov edx, eax
and edx, dword [ebp - 0x28]
test ecx, ecx
jns 0x42e882
mov ecx, dword [ebp - 0x7c]
shl edx, cl
jmp 0x42e884
shr edx, cl
mov ecx, dword [ebp - 0x80]
shr edx, cl
mov ecx, dword [ebp - 0x24]
imul edx, dword [ecx*4 + 0x4a5fd8]
mov ecx, dword [ecx*4 + 0x4a602c]
sar edx, cl
mov ecx, dword [ebp - 0x64]
mov byte [edi + ebx + 1], dl
mov edx, eax
and edx, dword [ebp - 8]
test ecx, ecx
jns 0x42e8b7
mov ecx, dword [ebp - 0x84]
shl edx, cl
jmp 0x42e8b9
shr edx, cl
mov ecx, dword [ebp - 0x88]
shr edx, cl
mov ecx, dword [ebp - 0x44]
imul edx, dword [ecx*4 + 0x4a5fd8]
mov ecx, dword [ecx*4 + 0x4a602c]
sar edx, cl
mov ecx, dword [ebp - 0x1c]
mov byte [edi + ebx + 2], dl
add edi, 3
mov dword [ebp - 0xc], edi
test ecx, ecx
je 0x42e919
and eax, ecx
mov ecx, dword [ebp - 0x48]
test ecx, ecx
jns 0x42e8f9
mov ecx, dword [ebp - 0x8c]
shl eax, cl
jmp 0x42e8fb
shr eax, cl
mov ecx, dword [ebp - 0x90]
shr eax, cl
mov ecx, dword [ebp - 0x18]
imul eax, dword [ecx*4 + 0x4a5fd8]
mov ecx, dword [ecx*4 + 0x4a602c]
sar eax, cl
jmp 0x42e91e
mov eax, 0xff
or dword [ebp - 0x4c], eax
cmp dword [ebp - 0x10], 4
jne 0x42e92e
mov byte [edi + ebx], al
inc edi
mov dword [ebp - 0xc], edi
mov ecx, dword [ebp - 0x54]
inc ecx
mov dword [ebp - 0x54], ecx
cmp ecx, dword [esi]
jl 0x42e820
mov edx, dword [ebp - 0x94]
test edx, edx
je 0x42e97d
cmp dword [esi + 0x10], 0
je 0x42e977
mov eax, dword [esi + 0xb0]
mov ecx, eax
sub ecx, dword [esi + 0xac]
cmp ecx, edx
jge 0x42e977
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 0x42e97d
add dword [esi + 0xac], edx
mov eax, dword [ebp - 0x40]
mov ecx, dword [esi + 4]
inc eax
mov dword [ebp - 0x40], eax
mov edx, ecx
cmp eax, ecx
jl 0x42e553
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x18], edx
cmp eax, 4
jne 0x42ea71
cmp dword [ebp - 0x4c], 0
mov dword [ebp - 0x18], edx
jne 0x42ea69
mov eax, dword [esi]
imul eax, ecx
mov ecx, edx
lea eax, [eax*4 - 1]
test eax, eax
js 0x42e9cc
nop
mov byte [ebx + eax], 0xff
sub eax, 4
jns 0x42e9c0
mov ecx, dword [esi + 4]
mov eax, dword [ebp - 0x10]
cmp dword [ebp - 0x68], 0
jle 0x42ea45
xor edi, edi
mov edx, ecx
mov dword [ebp - 0x40], edi
test edx, 0xfffffffe
jle 0x42ea45
mov ecx, dword [esi]
sub edx, edi
imul eax, ecx
dec edx
imul eax, edi
xor edi, edi
add eax, ebx
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x10]
imul edx, eax
imul eax, ecx
imul edx, ecx
add edx, ebx
test eax, eax
jle 0x42ea2e
mov ebx, dword [ebp - 0x68]
sub ebx, edx
nop dword [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]
imul eax, dword [ebp - 0x10]
cmp edi, eax
jl 0x42ea10
mov ebx, dword [ebp - 0x2c]
mov ecx, dword [esi + 4]
mov edx, ecx
mov edi, dword [ebp - 0x40]
mov eax, edx
inc edi
sar eax, 1
cmp edi, eax
mov dword [ebp - 0x40], edi
mov eax, dword [ebp - 0x10]
jl 0x42e9e4
mov edx, dword [ebp - 0x98]
mov eax, dword [esi]
mov dword [edx], eax
mov eax, dword [ebp + 8]
mov dword [eax], ecx
mov ecx, dword [ebp + 0xc]
test ecx, ecx
je 0x42ea60
mov eax, dword [esi + 8]
mov dword [ecx], eax
pop edi
mov eax, ebx
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x18]
jmp 0x42e9cc
mov ecx, dword [ebp - 0x18]
jmp 0x42e9cf
push ebx
call fcn.0046660e
mov eax, dword fs:[0x2c]
add esp, 4
mov eax, dword [eax]
pop edi
pop ebx
pop esi
mov dword [eax + 8], 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 + 8], 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 + 8], 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 + 8], 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 + 8], str.bad_header
xor eax, eax
mov esp, ebp
pop ebp
ret