Function at 0x10037230
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4a8
mov dword [ebp - 0x84], edx
lea edx, [ebp - 0xa8]
push esi
mov esi, ecx
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x8c], 0xff
call fcn.10036cb0
test eax, eax
je 0x10037290
mov eax, dword [esi + 4]
mov dword [ebp - 0x5c], eax
cdq
xor eax, edx
sub eax, edx
mov dword [esi + 4], eax
cmp eax, 0x1000000
jbe 0x10037297
mov ecx, dword [0x1012e948]
mov eax, dword fs:[0x2c]
mov eax, dword [eax + ecx*4]
mov dword [eax + 0x10], 0x100fafb4
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
cmp dword [esi], 0x1000000
jbe 0x100372bf
mov ecx, dword [0x1012e948]
mov eax, dword fs:[0x2c]
pop esi
mov eax, dword [eax + ecx*4]
mov dword [eax + 0x10], 0x100faf24
xor eax, eax
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x9c]
mov edx, dword [ebp - 0x88]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x98]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x94]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x90]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x8c]
push ebx
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0xa0]
mov dword [ebp - 8], eax
mov dword [ebp - 0x24], edx
push edi
mov edi, dword [ebp - 0xa4]
mov dword [ebp - 0x28], edi
cmp eax, 0xc
jne 0x10037333
mov ebx, dword [ebp - 0xa8]
mov dword [ebp - 0x2c], ebx
cmp ebx, 0x18
jge 0x10037351
mov ecx, edi
mov eax, 0x55555556
sub ecx, edx
sub ecx, 0x18
imul ecx
mov ebx, edx
shr ebx, 0x1f
add ebx, edx
jmp 0x1003734a
mov ecx, dword [ebp - 0xa8]
mov dword [ebp - 0x2c], ecx
cmp ecx, 0x10
jge 0x10037351
mov ebx, edi
sub ebx, edx
sub ebx, eax
sar ebx, 2
mov dword [ebp - 0x14], ebx
test ebx, ebx
jne 0x100373bb
mov ecx, dword [esi + 0xa8]
mov eax, ecx
sub eax, dword [esi + 0xb4]
mov edx, dword [esi + 0xac]
add eax, edx
cmp edi, eax
je 0x1003738e
push 0x1515
push 0x100fb030
push str.info.offset__s__callback_already_read___int___s__img_buffer___s__img_buffer_original_
call fcn.100ba3ee
mov edx, dword [esi + 0xac]
add esp, 0xc
mov ecx, dword [esi + 0xa8]
sub ecx, esi
lea eax, [edx - 0x28]
add eax, ecx
cmp edi, eax
je 0x100373bb
mov ecx, dword [0x1012e948]
mov eax, dword fs:[0x2c]
pop edi
pop ebx
pop esi
mov eax, dword [eax + ecx*4]
mov dword [eax + 0x10], str.bad_offset
xor eax, eax
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x2c], 0x18
mov ecx, dword [ebp - 0x44]
jne 0x100373d3
cmp ecx, 0xff000000
jne 0x100373d3
mov eax, 3
jmp 0x100373dd
xor eax, eax
test ecx, ecx
setne al
add eax, 3
mov dword [esi + 8], eax
mov ecx, dword [esi]
mov ebx, dword [esi + 4]
test ecx, ecx
js 0x10038582
jne 0x100373f8
lea edi, [ecx*4]
jmp 0x1003741a
mov eax, 0x7fffffff
cdq
idiv ecx
cmp eax, 4
jl 0x10038582
lea edi, [ecx*4]
mov eax, edi
test eax, eax
js 0x10038582
test ebx, ebx
js 0x10038582
je 0x10037434
mov eax, 0x7fffffff
cdq
idiv ebx
cmp edi, eax
jg 0x10038582
test ecx, ecx
je 0x10037452
xor edx, edx
mov eax, 0x7fffffff
div ecx
cmp eax, 4
jl 0x10038560
test edi, edi
js 0x10038560
test ebx, ebx
je 0x10037467
xor edx, edx
mov eax, 0x7fffffff
div ebx
cmp edi, eax
jg 0x10038560
imul ecx, ebx
shl ecx, 2
push ecx
call fcn.100bbecb
mov ebx, eax
add esp, 4
mov dword [ebp - 0x48], ebx
test ebx, ebx
je 0x10038560
xor edi, edi
cmp dword [ebp - 0x2c], 0x10
jge 0x10037c69
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x10037c3e
cmp eax, 0x100
jg 0x10037c3e
mov dword [ebp - 0xc], edi
test eax, eax
jle 0x100376f9
mov eax, dword [esi + 0xac]
lea ebx, [esi + 0xac]
xor edx, edx
nop
mov ecx, dword [esi + 0xb0]
cmp eax, ecx
jae 0x100374d6
mov dl, byte [eax]
lea edi, [eax + 1]
mov byte [ebp - 1], dl
mov eax, edi
jmp 0x10037529
cmp dword [esi + 0x20], 0
je 0x1003755e
push dword [esi + 0x24]
mov eax, dword [esi + 0x10]
lea edi, [esi + 0x28]
push edi
push dword [esi + 0x1c]
call eax
mov ecx, dword [ebx]
add esp, 0xc
sub ecx, dword [esi + 0xb4]
add dword [esi + 0xa8], ecx
test eax, eax
jne 0x10037514
lea ecx, [esi + 0x29]
mov dword [esi + 0x20], eax
mov dword [esi + 0xb0], ecx
mov byte [edi], al
jmp 0x1003751f
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 edi, eax
mov dword [ebx], edi
mov edx, ecx
mov edi, dword [ebp - 0xc]
shl edi, 2
mov dword [ebp - 0x1c], ebx
mov bl, byte [ebp - 1]
mov dword [ebp - 0x10], edi
mov byte [ebp + edi - 0x4a6], bl
lea ebx, [esi + 0xac]
mov dword [ebp - 0x38], edi
cmp eax, ecx
jae 0x10037573
mov bl, byte [eax]
inc eax
mov byte [ebp - 1], bl
lea ebx, [esi + 0xac]
jmp 0x100375c7
shl edx, 2
mov dword [ebp - 0x10], edx
mov byte [ebp + edx - 0x4a6], 0
mov edx, ecx
mov ecx, dword [ebp - 0x10]
jmp 0x10037576
mov ecx, dword [ebp - 0x38]
cmp dword [esi + 0x20], 0
je 0x100375f5
push dword [esi + 0x24]
mov eax, dword [esi + 0x10]
lea ecx, [esi + 0x28]
push ecx
push dword [esi + 0x1c]
call eax
mov ecx, dword [ebx]
add esp, 0xc
sub ecx, dword [esi + 0xb4]
add dword [esi + 0xa8], ecx
test eax, eax
jne 0x100375b1
lea ecx, [esi + 0x29]
mov dword [esi + 0x20], eax
mov dword [esi + 0xb0], ecx
mov byte [esi + 0x28], al
jmp 0x100375bc
lea ecx, [esi + 0x28]
add ecx, eax
mov dword [esi + 0xb0], ecx
mov al, byte [esi + 0x28]
mov edx, ecx
mov byte [ebp - 1], al
lea eax, [esi + 0x29]
mov dword [ebp - 0x20], ebx
mov ebx, eax
mov edi, dword [ebp - 0x20]
mov dword [ebp - 0x1c], eax
mov dword [edi], ebx
mov edi, dword [ebp - 0x10]
mov bl, byte [ebp - 1]
mov byte [ebp + edi - 0x4a7], bl
lea ebx, [esi + 0xac]
cmp eax, ecx
jae 0x100375fd
mov cl, byte [eax]
inc eax
mov byte [ebp - 1], cl
mov dword [ebx], eax
jmp 0x1003765a
mov byte [ebp + ecx - 0x4a7], 0
cmp dword [esi + 0x20], 0
je 0x10037656
push dword [esi + 0x24]
mov eax, dword [esi + 0x10]
lea edi, [esi + 0x28]
push edi
push dword [esi + 0x1c]
call eax
mov ecx, dword [ebx]
add esp, 0xc
sub ecx, dword [esi + 0xb4]
add dword [esi + 0xa8], ecx
test eax, eax
jne 0x1003763f
lea edx, [esi + 0x29]
mov dword [esi + 0x20], eax
mov dword [esi + 0xb0], edx
mov byte [edi], al
mov byte [ebp - 1], al
lea eax, [edi + 1]
mov dword [ebx], eax
jmp 0x1003765a
lea edx, [esi + 0x28]
add edx, eax
mov dword [esi + 0xb0], edx
mov al, byte [edi]
mov byte [ebp - 1], al
lea eax, [edi + 1]
mov dword [ebx], eax
jmp 0x1003765a
mov byte [ebp - 1], 0
cmp dword [ebp - 8], 0xc
mov ecx, dword [ebp - 0x10]
mov bl, byte [ebp - 1]
mov byte [ebp + ecx - 0x4a8], bl
lea ebx, [esi + 0xac]
je 0x100376d8
cmp eax, edx
jae 0x1003767c
inc eax
mov dword [ebx], eax
jmp 0x100376d8
cmp dword [esi + 0x20], 0
je 0x100376d8
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]
add esp, 0xc
sub ecx, dword [esi + 0xb4]
add dword [esi + 0xa8], ecx
test eax, eax
jne 0x100376bb
mov dword [esi + 0x20], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
mov byte [edi], 0
jmp 0x100376c6
add eax, 0x28
add eax, esi
mov dword [esi + 0xb0], eax
mov ecx, dword [ebp - 0x10]
lea eax, [edi + 1]
mov dword [esi + 0xac], eax
lea ebx, [esi + 0xac]
mov edx, dword [ebp - 0xc]
inc edx
mov byte [ebp + ecx - 0x4a5], 0xff
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0xc], edx
cmp edx, ecx
jl 0x100374c0
mov ebx, dword [ebp - 0x48]
xor edi, edi
jmp 0x100376fc
mov ecx, dword [ebp - 0x14]
xor eax, eax
cmp dword [ebp - 8], 0xc
setne al
add eax, 3
imul eax, ecx
mov ecx, dword [ebp - 0x28]
sub ecx, eax
sub ecx, dword [ebp - 0x24]
sub ecx, dword [ebp - 8]
je 0x1003775e
test ecx, ecx
jns 0x1003772a
mov eax, dword [esi + 0xb0]
mov dword [esi + 0xac], eax
jmp 0x1003775e
cmp dword [esi + 0x10], 0
je 0x10037758
mov edx, dword [esi + 0xb0]
mov eax, edx
sub eax, dword [esi + 0xac]
cmp eax, ecx
jge 0x10037758
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 0x1003775e
add dword [esi + 0xac], ecx
mov ecx, dword [ebp - 0x2c]
cmp ecx, 1
jne 0x10037770
mov eax, dword [esi]
add eax, 7
shr eax, 3
jmp 0x10037787
cmp ecx, 4
jne 0x1003777c
mov eax, dword [esi]
inc eax
shr eax, 1
jmp 0x10037787
cmp ecx, 8
jne 0x10037c13
mov eax, dword [esi]
mov edx, dword [esi + 4]
neg eax
and eax, 3
cmp ecx, 1
mov dword [ebp - 0x34], eax
mov ecx, edx
jne 0x100379e0
mov dword [ebp - 8], 0
test edx, edx
jle 0x1003845e
nop dword [eax]
mov eax, dword [esi + 0xac]
mov ecx, 7
mov dword [ebp - 0x14], ecx
cmp eax, dword [esi + 0xb0]
jae 0x100377d1
mov dl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x1003783e
cmp dword [esi + 0x20], 0
je 0x1003783c
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 0x10037820
mov ecx, dword [ebp - 0x14]
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
jmp 0x1003783e
mov ecx, dword [ebp - 0x14]
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
jmp 0x1003783e
xor dl, dl
movzx eax, dl
mov edx, dword [esi]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0xc], 0
test edx, edx
jle 0x1003798c
mov eax, edx
mov dword [ebp - 0x18], eax
nop word [eax + eax]
mov eax, dword [ebp - 0x1c]
sar eax, cl
and eax, 1
lea ecx, [eax*4]
movzx eax, byte [ebp + ecx - 0x4a8]
mov byte [edi + ebx], al
movzx eax, byte [ebp + ecx - 0x4a7]
mov byte [edi + ebx + 1], al
movzx eax, byte [ebp + ecx - 0x4a6]
mov byte [edi + ebx + 2], al
mov eax, dword [ebp - 0xc]
inc eax
mov byte [edi + ebx + 3], 0xff
add edi, 4
mov dword [ebp - 0xc], eax
cmp eax, edx
je 0x1003798c
mov ecx, dword [ebp - 0x14]
sub ecx, 1
mov dword [ebp - 0x14], ecx
jns 0x1003797e
mov eax, dword [esi + 0xac]
mov dword [ebp - 0x14], 7
cmp eax, dword [esi + 0xb0]
jae 0x100378ea
mov cl, byte [eax]
inc eax
mov edx, dword [ebp - 0x18]
mov dword [esi + 0xac], eax
movzx eax, cl
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0xc]
jmp 0x10037981
cmp dword [esi + 0x20], 0
je 0x1003796b
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 0x10037944
mov dword [esi + 0x20], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
lea eax, [esi + 0x29]
mov byte [esi + 0x28], 0
mov cl, byte [esi + 0x28]
mov dword [esi + 0xac], eax
mov edx, dword [esi]
movzx eax, cl
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0xc]
jmp 0x10037981
add eax, 0x28
add eax, esi
mov dword [esi + 0xb0], eax
lea eax, [esi + 0x29]
mov cl, byte [esi + 0x28]
mov dword [esi + 0xac], eax
mov edx, dword [esi]
movzx eax, cl
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0xc]
jmp 0x10037981
mov edx, dword [ebp - 0x18]
xor cl, cl
movzx eax, cl
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0xc]
jmp 0x10037981
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x18], edx
cmp eax, edx
jl 0x10037860
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x100379c7
cmp dword [esi + 0x10], 0
je 0x100379c1
mov edx, dword [esi + 0xb0]
mov ecx, edx
sub ecx, dword [esi + 0xac]
cmp ecx, eax
jge 0x100379c1
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 0x100379c7
add dword [esi + 0xac], eax
mov eax, dword [ebp - 8]
mov edx, dword [esi + 4]
inc eax
mov dword [ebp - 8], eax
mov ecx, edx
cmp eax, edx
jl 0x100377b0
jmp 0x1003845e
mov dword [ebp - 0x30], 0
test edx, edx
jle 0x1003845e
nop
cmp dword [esi], 0
mov dword [ebp - 0x20], 0
jle 0x10037bc2
mov ecx, dword [esi + 0xac]
mov edx, dword [esi + 0xb0]
cmp ecx, edx
jae 0x10037a1b
mov al, byte [ecx]
inc ecx
mov dword [esi + 0xac], ecx
jmp 0x10037a7e
cmp dword [esi + 0x20], 0
je 0x10037a7c
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 0x10037a63
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 0x10037a7e
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 0x10037a7e
xor al, al
cmp dword [ebp - 0x2c], 4
movzx eax, al
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x18], 0
jne 0x10037a9e
mov dword [ebp - 0x18], eax
and dword [ebp - 0x18], 0xf
shr eax, 4
mov dword [ebp - 0xc], eax
movzx eax, byte [ebp + eax*4 - 0x4a8]
mov byte [edi + ebx], al
mov eax, dword [ebp - 0xc]
movzx eax, byte [ebp + eax*4 - 0x4a7]
mov byte [edi + ebx + 1], al
mov eax, dword [ebp - 0xc]
movzx eax, byte [ebp + eax*4 - 0x4a6]
mov byte [edi + ebx + 2], al
mov eax, dword [esi]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x20]
mov byte [edi + ebx + 3], 0xff
inc eax
add edi, 4
cmp eax, dword [esi]
je 0x10037bbf
cmp dword [ebp - 0x2c], 8
jne 0x10037b7d
cmp ecx, edx
jae 0x10037b04
mov dl, byte [ecx]
lea eax, [ecx + 1]
mov ecx, dword [ebp - 0xc]
mov dword [esi + 0xac], eax
movzx edx, dl
jmp 0x10037b83
cmp dword [esi + 0x20], 0
je 0x10037b73
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 0x10037b55
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 0x10037b83
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 0x10037b83
mov ecx, dword [ebp - 0xc]
xor dl, dl
movzx edx, dl
jmp 0x10037b83
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0x18]
movzx eax, byte [ebp + edx*4 - 0x4a8]
mov byte [edi + ebx], al
movzx eax, byte [ebp + edx*4 - 0x4a7]
mov byte [edi + ebx + 1], al
movzx eax, byte [ebp + edx*4 - 0x4a6]
mov byte [edi + ebx + 2], al
mov eax, dword [ebp - 0x20]
add eax, 2
mov byte [edi + ebx + 3], 0xff
add edi, 4
mov dword [ebp - 0x20], eax
cmp eax, ecx
jl 0x10037a00
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x10037bfd
cmp dword [esi + 0x10], 0
je 0x10037bf7
mov edx, dword [esi + 0xb0]
mov ecx, edx
sub ecx, dword [esi + 0xac]
cmp ecx, eax
jge 0x10037bf7
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 0x10037bfd
add dword [esi + 0xac], eax
inc dword [ebp - 0x30]
mov edx, dword [esi + 4]
mov ecx, edx
cmp dword [ebp - 0x30], edx
jl 0x100379f0
jmp 0x1003845e
push ebx
call fcn.100ba5ea
mov ecx, dword [0x1012e948]
add esp, 4
mov eax, dword fs:[0x2c]
pop edi
mov eax, dword [eax + ecx*4]
pop ebx
pop esi
mov dword [eax + 0x10], str.bad_bpp
xor eax, eax
mov esp, ebp
pop ebp
ret
push ebx
call fcn.100ba5ea
mov ecx, dword [0x1012e948]
add esp, 4
mov eax, dword fs:[0x2c]
pop edi
mov eax, dword [eax + ecx*4]
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 - 0x20], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x28]
sub eax, dword [ebp - 0x24]
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x10], edi
sub eax, dword [ebp - 8]
je 0x10037cf1
test eax, eax
jns 0x10037cbe
mov eax, dword [esi + 0xb0]
mov dword [esi + 0xac], eax
jmp 0x10037cf1
cmp dword [esi + 0x10], edi
je 0x10037ceb
mov edx, dword [esi + 0xb0]
mov ecx, edx
sub ecx, dword [esi + 0xac]
cmp ecx, eax
jge 0x10037ceb
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 0x10037cf1
add dword [esi + 0xac], eax
mov ecx, dword [ebp - 0x2c]
cmp ecx, 0x18
jne 0x10037d00
mov eax, dword [esi]
lea eax, [eax + eax*2]
jmp 0x10037d0d
cmp ecx, 0x10
jne 0x10037d0b
mov eax, dword [esi]
add eax, eax
jmp 0x10037d0d
xor eax, eax
neg eax
and eax, 3
mov dword [ebp - 0x80], eax
cmp ecx, 0x18
jne 0x10037d28
mov dword [ebp - 0x54], 1
xor eax, eax
jmp 0x10037ef6
mov edx, dword [ebp - 0x18]
cmp ecx, 0x20
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x3c]
jne 0x10037d64
cmp edx, 0xff
jne 0x10037d64
cmp eax, 0xff00
jne 0x10037d64
cmp ecx, 0xff0000
jne 0x10037d64
cmp dword [ebp - 0x44], 0xff000000
jne 0x10037d7c
mov dword [ebp - 0x54], 2
xor eax, eax
jmp 0x10037ef6
test ecx, ecx
je 0x10038535
test eax, eax
je 0x10038535
test edx, edx
je 0x10038535
call fcn.10036c50
sub eax, 7
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x3c]
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 - 0x40]
movzx eax, al
mov dword [ebp - 0x14], eax
call fcn.10036c50
sub eax, 7
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x40]
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 - 0x18]
movzx eax, al
mov dword [ebp - 0x4c], eax
call fcn.10036c50
sub eax, 7
mov dword [ebp - 0x34], 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
mov ecx, dword [ebp - 0x44]
movzx eax, al
mov dword [ebp - 0x20], eax
call fcn.10036c50
sub eax, 7
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x44]
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 - 0x14], 8
movzx ecx, al
mov dword [ebp - 0xc], ecx
ja 0x1003850a
cmp dword [ebp - 0x4c], 8
ja 0x1003850a
mov eax, dword [ebp - 0x20]
cmp eax, 8
ja 0x1003850a
cmp ecx, 8
ja 0x1003850a
mov edx, dword [esi + 4]
mov ecx, edx
mov dword [ebp - 0x38], edi
test edx, edx
jle 0x1003845e
mov ecx, dword [ebp - 0x58]
neg ecx
mov dword [ebp - 0x60], ecx
mov ecx, 8
sub ecx, dword [ebp - 0x14]
mov dword [ebp - 0x64], ecx
mov ecx, dword [ebp - 0x30]
neg ecx
mov dword [ebp - 0x68], ecx
mov ecx, 8
sub ecx, dword [ebp - 0x4c]
mov dword [ebp - 0x6c], ecx
mov ecx, dword [ebp - 0x34]
neg ecx
mov dword [ebp - 0x70], ecx
mov ecx, 8
sub ecx, eax
mov eax, dword [ebp - 0x1c]
neg eax
mov dword [ebp - 0x74], ecx
mov dword [ebp - 0x78], eax
mov eax, 8
sub eax, dword [ebp - 0xc]
mov dword [ebp - 0x7c], eax
cmp dword [ebp - 0x54], 0
mov eax, dword [esi]
je 0x100381aa
mov dword [ebp - 8], 0
test eax, eax
jle 0x1003840d
lea edx, [esi + 0xac]
mov eax, dword [edx]
mov ecx, dword [esi + 0xb0]
cmp eax, ecx
jae 0x10037f86
mov bl, byte [eax]
inc eax
mov byte [ebp - 1], bl
jmp 0x10037fe3
cmp dword [esi + 0x20], 0
je 0x1003800c
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
test eax, eax
jne 0x10037fcf
lea ecx, [esi + 0x29]
mov dword [esi + 0x20], eax
mov dword [esi + 0xb0], ecx
mov byte [esi + 0x28], al
jmp 0x10037fda
lea ecx, [esi + 0x28]
add ecx, eax
mov dword [esi + 0xb0], ecx
mov al, byte [esi + 0x28]
mov byte [ebp - 1], al
lea eax, [esi + 0x29]
mov dword [ebp - 0x28], edx
mov edx, eax
mov ebx, dword [ebp - 0x28]
mov dword [ebp - 0x24], eax
mov dword [ebx], edx
mov ebx, dword [ebp - 0x48]
mov dl, byte [ebp - 1]
mov byte [edi + ebx + 2], dl
lea edx, [esi + 0xac]
cmp eax, ecx
jae 0x10038011
mov bl, byte [eax]
inc eax
mov byte [ebp - 1], bl
jmp 0x1003806e
mov byte [ebx + edi + 2], 0
cmp dword [esi + 0x20], 0
je 0x10038096
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
test eax, eax
jne 0x1003805a
lea ecx, [esi + 0x29]
mov dword [esi + 0x20], eax
mov dword [esi + 0xb0], ecx
mov byte [esi + 0x28], al
jmp 0x10038065
lea ecx, [esi + 0x28]
add ecx, eax
mov dword [esi + 0xb0], ecx
mov al, byte [esi + 0x28]
mov byte [ebp - 1], al
lea eax, [esi + 0x29]
mov dword [ebp - 0x28], edx
mov edx, eax
mov ebx, dword [ebp - 0x28]
mov dword [ebp - 0x24], eax
mov dword [ebx], edx
mov ebx, dword [ebp - 0x48]
mov dl, byte [ebp - 1]
mov byte [edi + ebx + 1], dl
lea edx, [esi + 0xac]
cmp eax, ecx
jae 0x1003809b
mov cl, byte [eax]
inc eax
mov dword [edx], eax
jmp 0x10038100
mov byte [ebx + edi + 1], 0
cmp dword [esi + 0x20], 0
je 0x100380fe
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
test eax, eax
jne 0x100380e9
mov dword [esi + 0x20], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
lea eax, [esi + 0x29]
mov byte [esi + 0x28], 0
mov cl, byte [esi + 0x28]
mov dword [edx], eax
jmp 0x10038100
add eax, 0x28
add eax, esi
mov dword [esi + 0xb0], eax
lea eax, [esi + 0x29]
mov cl, byte [esi + 0x28]
mov dword [edx], eax
jmp 0x10038100
xor cl, cl
cmp dword [ebp - 0x54], 2
mov byte [edi + ebx], cl
jne 0x10038183
cmp eax, dword [esi + 0xb0]
jae 0x1003811c
mov cl, byte [eax]
inc eax
mov dword [edx], eax
jmp 0x10038186
cmp dword [esi + 0x20], 0
je 0x1003817f
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
test eax, eax
jne 0x1003816a
mov dword [esi + 0x20], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
lea eax, [esi + 0x29]
mov byte [esi + 0x28], 0
mov cl, byte [esi + 0x28]
mov dword [edx], eax
jmp 0x10038186
add eax, 0x28
add eax, esi
mov dword [esi + 0xb0], eax
lea eax, [esi + 0x29]
mov cl, byte [esi + 0x28]
mov dword [edx], eax
jmp 0x10038186
xor cl, cl
jmp 0x10038186
or cl, 0xff
movzx eax, cl
or dword [ebp - 0x50], eax
mov eax, dword [ebp - 8]
inc eax
mov byte [edi + ebx + 3], cl
add edi, 4
mov dword [ebp - 8], eax
cmp eax, dword [esi]
jl 0x10037f72
mov dword [ebp - 0x10], edi
jmp 0x1003840d
mov dword [ebp - 0x24], 0
test eax, eax
jle 0x1003840d
nop dword [eax]
mov ecx, esi
call fcn.1002d470
cmp dword [ebp - 0x2c], 0x10
mov edi, eax
je 0x100381e0
mov ecx, esi
call fcn.1002d470
shl eax, 0x10
add eax, edi
mov dword [ebp - 0x28], eax
mov edi, eax
mov ecx, dword [ebp - 0x58]
mov edx, edi
and edx, dword [ebp - 0x3c]
mov eax, edx
shr eax, cl
mov ecx, dword [ebp - 0x60]
shl edx, cl
cmp dword [ebp - 0x58], 0
cmovge edx, eax
mov dword [ebp - 8], edx
cmp edx, 0x100
jb 0x1003821d
push 0x148e
push 0x100fafc0
push str.v___256
call fcn.100ba3ee
mov edx, dword [ebp - 8]
add esp, 0xc
mov ecx, dword [ebp - 0x64]
shr edx, cl
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 8], edx
cmp ecx, 8
jbe 0x1003824a
push 0x1490
push 0x100faf30
push str.bits___0__bits___8
call fcn.100ba3ee
mov edx, dword [ebp - 8]
add esp, 0xc
mov ecx, dword [ebp - 0x14]
mov eax, dword [ecx*4 + 0x10118a60]
mov ecx, dword [ecx*4 + 0x10118a84]
imul eax, edx
mov edx, edi
and edx, dword [ebp - 0x40]
sar eax, cl
mov ecx, dword [ebp - 0x10]
mov byte [ecx + ebx], al
inc ecx
mov eax, edx
mov dword [ebp - 0x10], ecx
mov ecx, dword [ebp - 0x30]
shr eax, cl
mov ecx, dword [ebp - 0x68]
shl edx, cl
cmp dword [ebp - 0x30], 0
cmovge edx, eax
mov dword [ebp - 8], edx
cmp edx, 0x100
jb 0x100382a4
push 0x148e
push 0x100fafc0
push str.v___256
call fcn.100ba3ee
mov edx, dword [ebp - 8]
add esp, 0xc
mov ecx, dword [ebp - 0x6c]
shr edx, cl
mov ecx, dword [ebp - 0x4c]
mov dword [ebp - 8], edx
cmp ecx, 8
jbe 0x100382d1
push 0x1490
push 0x100faf30
push str.bits___0__bits___8
call fcn.100ba3ee
mov edx, dword [ebp - 8]
add esp, 0xc
mov ecx, dword [ebp - 0x4c]
mov eax, dword [ecx*4 + 0x10118a60]
mov ecx, dword [ecx*4 + 0x10118a84]
imul eax, edx
mov edx, edi
and edx, dword [ebp - 0x18]
sar eax, cl
mov ecx, dword [ebp - 0x10]
mov byte [ecx + ebx], al
inc ecx
mov eax, edx
mov dword [ebp - 0x10], ecx
mov ecx, dword [ebp - 0x34]
shr eax, cl
mov ecx, dword [ebp - 0x70]
shl edx, cl
cmp dword [ebp - 0x34], 0
cmovge edx, eax
mov dword [ebp - 8], edx
cmp edx, 0x100
jb 0x1003832b
push 0x148e
push 0x100fafc0
push str.v___256
call fcn.100ba3ee
mov edx, dword [ebp - 8]
add esp, 0xc
mov ecx, dword [ebp - 0x74]
shr edx, cl
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 8], edx
cmp ecx, 8
jbe 0x10038358
push 0x1490
push 0x100faf30
push str.bits___0__bits___8
call fcn.100ba3ee
mov edx, dword [ebp - 8]
add esp, 0xc
mov ecx, dword [ebp - 0x20]
mov eax, dword [ecx*4 + 0x10118a60]
mov ecx, dword [ecx*4 + 0x10118a84]
imul eax, edx
sar eax, cl
mov ecx, dword [ebp - 0x10]
mov byte [ecx + ebx], al
inc ecx
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x10], ecx
test eax, eax
je 0x100383ec
mov edx, dword [ebp - 0x1c]
and edi, eax
mov eax, edi
mov ecx, edx
shr eax, cl
mov ecx, dword [ebp - 0x78]
shl edi, cl
test edx, edx
cmovns edi, eax
cmp edi, 0x100
jb 0x100383b0
push 0x148e
push 0x100fafc0
push str.v___256
call fcn.100ba3ee
add esp, 0xc
mov ecx, dword [ebp - 0x7c]
shr edi, cl
mov ecx, dword [ebp - 0xc]
cmp ecx, 8
jbe 0x100383d7
push 0x1490
push 0x100faf30
push str.bits___0__bits___8
call fcn.100ba3ee
mov ecx, dword [ebp - 0xc]
add esp, 0xc
mov eax, dword [ecx*4 + 0x10118a60]
mov ecx, dword [ecx*4 + 0x10118a84]
imul eax, edi
sar eax, cl
jmp 0x100383f1
mov eax, 0xff
mov edi, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x24]
or dword [ebp - 0x50], eax
inc ecx
mov dword [ebp - 0x24], ecx
mov byte [edi + ebx], al
inc edi
mov dword [ebp - 0x10], edi
cmp ecx, dword [esi]
jl 0x100381c0
mov edx, dword [ebp - 0x80]
test edx, edx
je 0x1003844a
cmp dword [esi + 0x10], 0
je 0x10038444
mov eax, dword [esi + 0xb0]
mov ecx, eax
sub ecx, dword [esi + 0xac]
cmp ecx, edx
jge 0x10038444
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 0x1003844a
add dword [esi + 0xac], edx
mov eax, dword [ebp - 0x38]
mov edx, dword [esi + 4]
inc eax
mov dword [ebp - 0x38], eax
mov ecx, edx
cmp eax, edx
jl 0x10037f51
cmp dword [ebp - 0x50], 0
jne 0x10038480
mov eax, dword [esi]
imul eax, edx
lea eax, [eax*4 - 1]
test eax, eax
js 0x10038480
mov byte [eax + ebx], 0xff
sub eax, 4
jns 0x10038474
mov ecx, dword [esi + 4]
cmp dword [ebp - 0x5c], 0
jle 0x100384ef
xor edi, edi
mov dword [ebp - 0x38], edi
test ecx, 0xfffffffe
jle 0x100384ef
mov eax, dword [esi]
sub ecx, edi
dec ecx
mov edx, eax
imul ecx, eax
imul edx, edi
xor edi, edi
shl eax, 2
shl ecx, 2
shl edx, 2
mov dword [ebp - 0x5c], edx
lea edx, [ecx + ebx]
test eax, eax
jle 0x100384dd
mov ebx, dword [ebp - 0x5c]
sub ebx, ecx
nop word [eax + eax]
mov al, byte [edx]
lea edx, [edx + 1]
mov cl, byte [edx + ebx - 1]
inc edi
mov byte [edx + ebx - 1], al
mov byte [edx - 1], cl
mov eax, dword [esi]
shl eax, 2
cmp edi, eax
jl 0x100384c0
mov ebx, dword [ebp - 0x48]
mov edi, dword [ebp - 0x38]
mov ecx, dword [esi + 4]
inc edi
mov eax, ecx
mov dword [ebp - 0x38], edi
sar eax, 1
cmp edi, eax
jl 0x10038493
mov ecx, dword [ebp - 0x84]
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 fcn.100ba5ea
mov ecx, dword [0x1012e948]
add esp, 4
mov eax, dword fs:[0x2c]
pop edi
mov eax, dword [eax + ecx*4]
pop ebx
pop esi
mov dword [eax + 0x10], str.bad_masks
xor eax, eax
mov esp, ebp
pop ebp
ret
push ebx
call fcn.100ba5ea
mov ecx, dword [0x1012e948]
add esp, 4
mov eax, dword fs:[0x2c]
pop edi
mov eax, dword [eax + ecx*4]
pop ebx
pop esi
mov dword [eax + 0x10], 0x100fb024
xor eax, eax
mov esp, ebp
pop ebp
ret
mov ecx, dword [0x1012e948]
mov eax, dword fs:[0x2c]
pop edi
pop ebx
pop esi
mov eax, dword [eax + ecx*4]
mov dword [eax + 0x10], 0x100fb0dc
xor eax, eax
mov esp, ebp
pop ebp
ret
mov ecx, dword [0x1012e948]
mov eax, dword fs:[0x2c]
pop edi
pop ebx
pop esi
mov eax, dword [eax + ecx*4]
mov dword [eax + 0x10], 0x100fb0d0
xor eax, eax
mov esp, ebp
pop ebp
ret