Function at 0x435ad0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4b0
push esi
mov dword [ebp - 0x8c], edx
mov esi, ecx
lea edx, [ebp - 0xb0]
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x94], 0xff
call fcn.004355c0
test eax, eax
je 0x435b2c
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 0x435b33
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
cmp dword [esi], 0x1000000
ja 0x435b1a
mov eax, dword [ebp - 0xa4]
mov edx, dword [ebp - 0x90]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0xa0]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x9c]
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x98]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x94]
push ebx
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0xa8]
mov dword [ebp - 8], eax
mov dword [ebp - 0x2c], edx
push edi
mov edi, dword [ebp - 0xac]
mov dword [ebp - 0x4c], edi
cmp eax, 0xc
jne 0x435baf
mov ebx, dword [ebp - 0xb0]
mov dword [ebp - 0x40], ebx
cmp ebx, 0x18
jge 0x435bcd
mov ecx, edi
mov eax, 0x55555556
sub ecx, edx
sub ecx, 0x18
imul ecx
mov ebx, edx
shr ebx, 0x1f
add ebx, edx
jmp 0x435bc6
mov ecx, dword [ebp - 0xb0]
mov dword [ebp - 0x40], ecx
cmp ecx, 0x10
jge 0x435bcd
mov ebx, edi
sub ebx, edx
sub ebx, eax
sar ebx, 2
mov dword [ebp - 0x20], ebx
test ebx, ebx
jne 0x435c46
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 0x436e53
cmp edi, ecx
jl 0x436e38
mov eax, edi
sub eax, ecx
cmp eax, 0x400
jg 0x436e38
test eax, eax
je 0x435c46
jns 0x435c14
mov eax, dword [esi + 0xb0]
jmp 0x435c40
cmp dword [esi + 0x10], 0
je 0x435c3e
mov ebx, dword [esi + 0xb0]
mov ecx, ebx
sub ecx, edx
cmp ecx, eax
jge 0x435c3e
sub eax, ecx
mov dword [esi + 0xac], ebx
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x14]
call eax
add esp, 8
jmp 0x435c46
add eax, edx
mov dword [esi + 0xac], eax
cmp dword [ebp - 0x40], 0x18
mov ecx, dword [ebp - 0xc]
jne 0x435c5e
cmp ecx, 0xff000000
jne 0x435c5e
mov eax, 3
jmp 0x435c68
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 0x436e1d
je 0x435c9a
mov eax, 0x7fffffff
cdq
idiv ecx
cmp eax, 4
jl 0x436e1d
lea eax, [ecx*4]
test eax, eax
js 0x436e1d
test ebx, ebx
js 0x436e1d
je 0x435cbb
mov eax, 0x7fffffff
cdq
idiv ebx
lea edx, [ecx*4]
cmp edx, eax
jg 0x436e1d
test ecx, ecx
jne 0x435ccb
lea eax, [ecx*4]
mov dword [ebp - 0x28], eax
jmp 0x435cee
mov eax, 0x7fffffff
cdq
idiv ecx
cmp eax, 4
jl 0x436e02
lea edx, [ecx*4]
test edx, edx
js 0x436e02
mov dword [ebp - 0x28], edx
test ebx, ebx
je 0x435d03
mov eax, 0x7fffffff
cdq
idiv ebx
cmp dword [ebp - 0x28], eax
jg 0x436e02
imul ebx, ecx
lea eax, [ebx*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 - 0x34], ebx
test ebx, ebx
je 0x436e02
cmp dword [ebp - 0x40], 0x10
jge 0x4364f5
mov eax, dword [ebp - 0x20]
xor edi, edi
test eax, eax
je 0x4364d0
cmp eax, 0x100
jg 0x4364d0
mov dword [ebp - 0x18], edi
lea ebx, [esi + 0xac]
test eax, eax
jle 0x435f9c
lea edi, [esi + 0x20]
nop word [eax + eax]
mov eax, dword [ebx]
mov ecx, dword [esi + 0xb0]
cmp eax, ecx
jae 0x435d74
mov dl, byte [eax]
inc eax
mov byte [ebp - 1], dl
jmp 0x435dc9
cmp dword [esi + 0x20], 0
lea edi, [esi + 0x20]
je 0x435e3f
push dword [esi + 0x24]
lea eax, [esi + 0x28]
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x10]
call eax
mov ecx, dword [ebx]
add esp, 0xc
sub ecx, dword [esi + 0xb4]
add dword [esi + 0xa8], ecx
test eax, eax
jne 0x435db5
lea ecx, [esi + 0x29]
mov dword [edi], eax
mov dword [esi + 0xb0], ecx
mov byte [esi + 0x28], al
jmp 0x435dc0
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 - 0x3c], ebx
mov edx, ecx
mov esi, dword [ebp - 0x3c]
mov ebx, eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x1c], edi
mov dword [esi], ebx
mov esi, dword [ebp - 0x18]
mov bl, byte [ebp - 1]
shl esi, 2
mov dword [ebp - 0xc], esi
mov byte [ebp + esi - 0x4ae], bl
mov esi, dword [ebp - 0x38]
lea ebx, [esi + 0xac]
cmp eax, ecx
jb 0x435e66
mov ecx, dword [ebp - 0xc]
cmp dword [edi], 0
je 0x435e96
push dword [esi + 0x24]
lea eax, [esi + 0x28]
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x10]
call eax
mov ecx, dword [ebx]
lea edx, [esi + 0x28]
sub ecx, dword [esi + 0xb4]
add esp, 0xc
add dword [esi + 0xa8], ecx
mov dword [ebx], edx
test eax, eax
jne 0x435e57
lea ecx, [esi + 0x29]
mov dword [edi], eax
mov dword [esi + 0xb0], ecx
mov byte [edx], al
jmp 0x435e62
mov edx, ecx
mov dword [ebp - 0x1c], edi
mov ecx, dword [ebp - 0x18]
shl ecx, 2
mov dword [ebp - 0xc], ecx
mov byte [ebp + ecx - 0x4ae], 0
jmp 0x435dfe
lea ecx, [esi + 0x28]
add ecx, eax
mov dword [esi + 0xb0], ecx
mov eax, dword [ebx]
mov edx, ecx
mov bl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
mov esi, dword [ebp - 0xc]
mov byte [ebp - 1], bl
mov byte [ebp + esi - 0x4af], bl
mov esi, dword [ebp - 0x38]
lea ebx, [esi + 0xac]
cmp eax, ecx
jae 0x435e9e
mov cl, byte [eax]
lea edi, [esi + 0x20]
inc eax
mov byte [ebp - 1], cl
mov dword [ebx], eax
jmp 0x435f08
mov byte [ebp + ecx - 0x4af], 0
cmp dword [edi], 0
je 0x435f04
push dword [esi + 0x24]
lea eax, [esi + 0x28]
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x10]
call eax
mov ecx, dword [ebx]
add esp, 0xc
sub ecx, dword [esi + 0xb4]
add dword [esi + 0xa8], ecx
lea ecx, [esi + 0x28]
mov dword [ebx], ecx
test eax, eax
jne 0x435eed
mov eax, dword [ebp - 0x1c]
lea edx, [esi + 0x29]
mov dword [esi + 0xb0], edx
mov dword [eax], 0
mov byte [ecx], 0
mov eax, dword [ebx]
mov cl, byte [eax]
inc eax
mov byte [ebp - 1], cl
mov dword [ebx], eax
jmp 0x435f08
lea edx, [esi + 0x28]
add edx, eax
mov eax, dword [ebx]
mov dword [esi + 0xb0], edx
mov cl, byte [eax]
inc eax
mov byte [ebp - 1], cl
mov dword [ebx], eax
jmp 0x435f08
mov byte [ebp - 1], 0
cmp dword [ebp - 8], 0xc
mov ecx, dword [ebp - 0xc]
mov bl, byte [ebp - 1]
mov byte [ebp + ecx - 0x4b0], bl
lea ebx, [esi + 0xac]
je 0x435f7f
cmp eax, edx
jae 0x435f2a
inc eax
mov dword [ebx], eax
jmp 0x435f7f
mov eax, dword [ebp - 0x1c]
cmp dword [eax], 0
je 0x435f7f
push dword [esi + 0x24]
lea eax, [esi + 0x28]
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x10]
call eax
mov ecx, dword [ebx]
add esp, 0xc
sub ecx, dword [esi + 0xb4]
add dword [esi + 0xa8], ecx
lea ecx, [esi + 0x28]
mov dword [ebx], ecx
test eax, eax
jne 0x435f72
mov eax, dword [ebp - 0x1c]
mov dword [eax], 0
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
mov byte [ecx], 0
jmp 0x435f7d
add eax, 0x28
add eax, esi
mov dword [esi + 0xb0], eax
inc dword [ebx]
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0xc]
inc edx
mov dword [ebp - 0x18], edx
mov byte [ebp + eax - 0x4ad], 0xff
cmp edx, dword [ebp - 0x20]
jl 0x435d60
xor edi, edi
mov ecx, dword [ebp - 0x4c]
xor eax, eax
cmp dword [ebp - 8], 0xc
setne al
add eax, 3
imul eax, dword [ebp - 0x20]
sub ecx, eax
sub ecx, dword [ebp - 0x2c]
sub ecx, dword [ebp - 8]
je 0x435fef
test ecx, ecx
jns 0x435fc7
mov eax, dword [esi + 0xb0]
mov dword [ebx], eax
jmp 0x435fef
cmp dword [esi + 0x10], 0
je 0x435fed
mov edx, dword [esi + 0xb0]
mov eax, edx
sub eax, dword [ebx]
cmp eax, ecx
jge 0x435fed
sub ecx, eax
mov dword [ebx], edx
mov eax, dword [esi + 0x14]
push ecx
push dword [esi + 0x1c]
call eax
add esp, 8
jmp 0x435fef
add dword [ebx], ecx
mov ecx, dword [ebp - 0x40]
cmp ecx, 1
jne 0x436001
mov eax, dword [esi]
add eax, 7
shr eax, 3
jmp 0x436018
cmp ecx, 4
jne 0x43600d
mov eax, dword [esi]
inc eax
shr eax, 1
jmp 0x436018
cmp ecx, 8
jne 0x4364a9
mov eax, dword [esi]
mov edx, dword [esi + 4]
neg eax
and eax, 3
cmp ecx, 1
mov dword [ebp - 0x44], eax
mov ecx, edx
jne 0x43624d
mov dword [ebp - 0x38], 0
test edx, edx
jle 0x4364a1
nop dword [eax]
mov ecx, dword [ebx]
mov dword [ebp - 0x1c], 7
cmp ecx, dword [esi + 0xb0]
jae 0x436058
mov dl, byte [ecx]
inc ecx
mov dword [ebx], ecx
jmp 0x4360b9
cmp dword [esi + 0x20], 0
je 0x4360b7
push dword [esi + 0x24]
lea eax, [esi + 0x28]
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x10]
call eax
mov ecx, dword [ebx]
add esp, 0xc
sub ecx, dword [esi + 0xb4]
add dword [esi + 0xa8], ecx
lea ecx, [esi + 0x28]
mov dword [ebx], ecx
test eax, eax
jne 0x4360a1
mov dword [esi + 0x20], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
mov byte [ecx], 0
mov eax, dword [ebx]
mov dl, byte [eax]
lea ecx, [eax + 1]
mov dword [ebx], ecx
jmp 0x4360b9
add eax, 0x28
add eax, esi
mov dword [esi + 0xb0], eax
mov eax, dword [ebx]
mov dl, byte [eax]
lea ecx, [eax + 1]
mov dword [ebx], ecx
jmp 0x4360b9
xor dl, dl
movzx eax, dl
mov dword [ebp - 0x28], eax
mov eax, dword [esi]
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], eax
test eax, eax
jle 0x4361fc
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x18], eax
nop dword [eax]
mov edx, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x1c]
sar edx, cl
mov ecx, dword [ebp - 0x34]
and edx, 1
movzx eax, byte [ebp + edx*4 - 0x4b0]
mov byte [edi + ecx], al
movzx eax, byte [ebp + edx*4 - 0x4af]
mov byte [edi + ecx + 1], al
movzx eax, byte [ebp + edx*4 - 0x4ae]
mov edx, dword [ebp - 0x3c]
mov byte [edi + ecx + 2], al
mov eax, dword [ebp - 0x10]
mov byte [edi + ecx + 3], 0xff
inc eax
add edi, 4
mov dword [ebp - 0x10], eax
mov ecx, edx
cmp eax, dword [ebp - 0xc]
je 0x4361fc
sub dword [ebp - 0x1c], 1
jns 0x4361e5
mov dword [ebp - 0x1c], 7
cmp edx, dword [esi + 0xb0]
jae 0x436162
mov al, byte [edx]
lea ecx, [edx + 1]
mov byte [ebp - 1], al
mov dl, byte [ebp - 1]
mov eax, dword [ebp - 0x18]
movzx edx, dl
mov dword [ebx], ecx
mov dword [ebp - 0x28], edx
jmp 0x4361ea
cmp dword [esi + 0x20], 0
je 0x4361d1
push dword [esi + 0x24]
lea eax, [esi + 0x28]
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x10]
call eax
mov ecx, dword [ebx]
add esp, 0xc
sub ecx, dword [esi + 0xb4]
add dword [esi + 0xa8], ecx
lea ecx, [esi + 0x28]
mov dword [ebx], ecx
test eax, eax
jne 0x4361b3
mov dword [esi + 0x20], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
mov byte [ecx], 0
mov eax, dword [ebx]
mov dl, byte [eax]
lea ecx, [eax + 1]
movzx edx, dl
mov dword [ebx], ecx
mov eax, dword [esi]
mov dword [ebp - 0x28], edx
jmp 0x4361ea
add eax, 0x28
add eax, esi
mov dword [esi + 0xb0], eax
mov eax, dword [ebx]
mov dl, byte [eax]
lea ecx, [eax + 1]
movzx edx, dl
mov dword [ebx], ecx
mov eax, dword [esi]
mov dword [ebp - 0x28], edx
jmp 0x4361ea
mov eax, dword [ebp - 0x18]
mov ecx, edx
mov byte [ebp - 1], 0
mov dl, byte [ebp - 1]
movzx edx, dl
mov dword [ebp - 0x28], edx
jmp 0x4361ea
mov ecx, dword [ebx]
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x10], eax
jl 0x4360e0
mov eax, dword [ebp - 0x44]
test eax, eax
je 0x436231
cmp dword [esi + 0x10], 0
je 0x43622d
mov edx, dword [esi + 0xb0]
sub edx, ecx
cmp edx, eax
jge 0x43622d
mov ecx, dword [esi + 0xb0]
sub eax, edx
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x14]
mov dword [ebx], ecx
call eax
add esp, 8
jmp 0x436231
add eax, ecx
mov dword [ebx], eax
mov eax, dword [ebp - 0x38]
mov edx, dword [esi + 4]
inc eax
mov dword [ebp - 0x38], eax
mov ecx, edx
cmp eax, edx
jl 0x436040
mov ebx, dword [ebp - 0x34]
jmp 0x436d28
mov dword [ebp - 8], 0
test edx, edx
jle 0x4364a1
nop dword [eax]
cmp dword [esi], 0
mov dword [ebp - 0x48], 0
jle 0x436461
mov ecx, dword [ebx]
lea eax, [esi + 0x20]
mov dword [ebp - 0xc], eax
cmp ecx, dword [esi + 0xb0]
jae 0x436287
mov dl, byte [ecx]
inc ecx
mov dword [ebx], ecx
jmp 0x4362f0
cmp dword [eax], 0
je 0x4362eb
push dword [esi + 0x24]
lea eax, [esi + 0x28]
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x10]
call eax
mov ecx, dword [ebx]
add esp, 0xc
sub ecx, dword [esi + 0xb4]
add dword [esi + 0xa8], ecx
lea ecx, [esi + 0x28]
mov dword [ebx], ecx
test eax, eax
jne 0x4362d5
mov eax, dword [ebp - 0xc]
mov dword [eax], 0
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
mov byte [ecx], 0
mov eax, dword [ebx]
mov dl, byte [eax]
lea ecx, [eax + 1]
mov dword [ebx], ecx
jmp 0x4362f0
add eax, 0x28
add eax, esi
mov dword [esi + 0xb0], eax
mov eax, dword [ebx]
mov dl, byte [eax]
lea ecx, [eax + 1]
mov dword [ebx], ecx
jmp 0x4362f0
xor dl, dl
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0x40], 4
movzx eax, dl
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x24], 0
jne 0x436311
mov edx, eax
and edx, 0xf
shr eax, 4
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x10], eax
movzx eax, byte [ebp + eax*4 - 0x4b0]
mov edx, dword [ebp - 0x34]
mov byte [edi + edx], al
mov eax, dword [ebp - 0x10]
movzx eax, byte [ebp + eax*4 - 0x4af]
mov byte [edi + edx + 1], al
mov eax, dword [ebp - 0x10]
movzx eax, byte [ebp + eax*4 - 0x4ae]
mov byte [edi + edx + 2], al
mov eax, dword [esi]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x48]
mov byte [edi + edx + 3], 0xff
inc eax
add edi, 4
cmp eax, dword [esi]
je 0x43645e
cmp dword [ebp - 0x40], 8
jne 0x436416
cmp ecx, dword [esi + 0xb0]
jae 0x436381
mov al, byte [ecx]
mov byte [ebp - 1], al
lea eax, [ecx + 1]
mov ecx, dword [ebp - 0x10]
mov dword [ebx], eax
movzx eax, byte [ebp - 1]
mov dword [ebp - 0x24], eax
jmp 0x43641c
mov eax, dword [ebp - 0xc]
cmp dword [eax], 0
je 0x436406
push dword [esi + 0x24]
lea eax, [esi + 0x28]
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x10]
call eax
mov ecx, dword [ebx]
add esp, 0xc
sub ecx, dword [esi + 0xb4]
add dword [esi + 0xa8], ecx
lea ecx, [esi + 0x28]
mov dword [ebx], ecx
test eax, eax
jne 0x4363e3
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x34]
mov dword [eax], 0
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
mov byte [ecx], 0
mov eax, dword [ebx]
mov cl, byte [eax]
inc eax
mov byte [ebp - 1], cl
mov dword [ebx], eax
movzx eax, byte [ebp - 1]
mov ecx, dword [esi]
mov dword [ebp - 0x24], eax
jmp 0x43641c
mov edx, dword [ebp - 0x34]
add eax, 0x28
add eax, esi
mov dword [esi + 0xb0], eax
mov eax, dword [ebx]
mov cl, byte [eax]
inc eax
mov byte [ebp - 1], cl
mov dword [ebx], eax
movzx eax, byte [ebp - 1]
mov ecx, dword [esi]
mov dword [ebp - 0x24], eax
jmp 0x43641c
mov ecx, dword [ebp - 0x10]
mov byte [ebp - 1], 0
movzx eax, byte [ebp - 1]
mov dword [ebp - 0x24], eax
jmp 0x43641c
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x24]
movzx eax, byte [ebp + eax*4 - 0x4b0]
mov byte [edi + edx], al
mov eax, dword [ebp - 0x24]
movzx eax, byte [ebp + eax*4 - 0x4af]
mov byte [edi + edx + 1], al
mov eax, dword [ebp - 0x24]
movzx eax, byte [ebp + eax*4 - 0x4ae]
mov byte [edi + edx + 2], al
mov eax, dword [ebp - 0x48]
add eax, 2
mov byte [edi + edx + 3], 0xff
add edi, 4
mov dword [ebp - 0x48], eax
cmp eax, ecx
jl 0x436270
mov eax, dword [ebp - 0x44]
test eax, eax
je 0x436490
cmp dword [esi + 0x10], 0
je 0x43648e
mov edx, dword [esi + 0xb0]
mov ecx, edx
sub ecx, dword [ebx]
cmp ecx, eax
jge 0x43648e
sub eax, ecx
mov dword [ebx], edx
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x14]
call eax
mov eax, dword [ebp - 0x44]
add esp, 8
jmp 0x436490
add dword [ebx], eax
mov edx, dword [esi + 4]
mov ecx, edx
inc dword [ebp - 8]
cmp dword [ebp - 8], edx
jl 0x436260
mov ebx, dword [ebp - 0x34]
jmp 0x436d28
push dword [ebp - 0x34]
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
sub edi, dword [ebp - 0x2c]
xor edx, edx
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x54], edx
sub edi, dword [ebp - 8]
je 0x436588
test edi, edi
jns 0x436553
mov eax, dword [esi + 0xb0]
mov dword [esi + 0xac], eax
jmp 0x436588
cmp dword [esi + 0x10], edx
je 0x436582
mov ecx, dword [esi + 0xb0]
mov eax, ecx
sub eax, dword [esi + 0xac]
cmp eax, edi
jge 0x436582
sub edi, eax
mov dword [esi + 0xac], ecx
mov eax, dword [esi + 0x14]
push edi
push dword [esi + 0x1c]
call eax
add esp, 8
xor edx, edx
jmp 0x436588
add dword [esi + 0xac], edi
mov ecx, dword [ebp - 0x40]
cmp ecx, 0x18
jne 0x436597
mov eax, dword [esi]
lea eax, [eax + eax*2]
jmp 0x4365a4
cmp ecx, 0x10
jne 0x4365a2
mov eax, dword [esi]
add eax, eax
jmp 0x4365a4
xor eax, eax
neg eax
and eax, 3
mov dword [ebp - 0x84], eax
cmp ecx, 0x18
jne 0x4365c4
xor edi, edi
mov dword [ebp - 0x54], 1
xor eax, eax
jmp 0x436791
mov edi, dword [ebp - 0x60]
cmp ecx, 0x20
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x50]
jne 0x436602
cmp edi, 0xff
jne 0x436602
cmp eax, 0xff00
jne 0x436602
cmp ecx, 0xff0000
jne 0x436602
cmp dword [ebp - 0xc], 0xff000000
jne 0x43661d
xor edi, edi
mov dword [ebp - 0x54], 2
xor eax, eax
jmp 0x436791
mov dword [ebp - 0x54], edx
test ecx, ecx
je 0x436ddd
test eax, eax
je 0x436ddd
test edi, edi
je 0x436ddd
call fcn.004354e0
sub eax, 7
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x50]
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 - 0x24]
movzx eax, al
mov dword [ebp - 0x18], eax
call fcn.004354e0
sub eax, 7
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x24]
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, edi
movzx eax, al
mov dword [ebp - 0x1c], eax
call fcn.004354e0
sub eax, 7
mov edx, edi
mov dword [ebp - 0x10], eax
and edi, 0x55555555
shr edx, 1
and edx, 0x55555555
add edx, edi
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 - 0xc]
movzx edi, al
mov dword [ebp - 0x38], edi
call fcn.004354e0
sub eax, 7
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0xc]
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 - 0x18], 8
movzx eax, al
mov dword [ebp - 0x28], eax
ja 0x436ddd
cmp dword [ebp - 0x1c], 8
ja 0x436ddd
cmp edi, 8
ja 0x436ddd
cmp eax, 8
ja 0x436ddd
mov edx, dword [esi + 4]
mov ecx, edx
mov dword [ebp - 0x4c], 0
test edx, edx
jle 0x436d28
mov ecx, dword [ebp - 0x44]
neg ecx
mov dword [ebp - 0x88], ecx
mov ecx, 8
sub ecx, dword [ebp - 0x18]
mov dword [ebp - 0x68], ecx
mov ecx, dword [ebp - 0x48]
neg ecx
mov dword [ebp - 0x6c], ecx
mov ecx, 8
sub ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x70], ecx
mov ecx, dword [ebp - 0x10]
neg ecx
mov dword [ebp - 0x74], ecx
mov ecx, 8
sub ecx, edi
mov dword [ebp - 0x78], ecx
mov ecx, dword [ebp - 0x3c]
neg ecx
mov dword [ebp - 0x7c], ecx
mov ecx, 8
sub ecx, eax
mov eax, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__wassert]
mov dword [ebp - 0x80], ecx
mov dword [ebp - 0x2c], eax
nop word [eax + eax]
cmp dword [ebp - 0x54], 0
mov eax, dword [esi]
mov dword [ebp - 0x5c], 0
je 0x436a8c
test eax, eax
jle 0x436cd4
mov ecx, dword [ebp - 0x14]
lea edi, [esi + 0xac]
lea eax, [esi + 0x20]
nop word [eax + eax]
mov edx, dword [esi + 0xb0]
mov dword [ebp - 0x30], eax
mov eax, dword [edi]
mov dword [ebp - 0x20], edx
cmp eax, edx
jae 0x43684a
mov bl, byte [eax]
inc eax
mov byte [ebp - 1], bl
jmp 0x4368ac
cmp dword [esi + 0x20], 0
lea edx, [esi + 0x20]
mov dword [ebp - 0x30], edx
je 0x4368d1
push dword [esi + 0x24]
lea eax, [esi + 0x28]
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x10]
call eax
mov ecx, dword [edi]
add esp, 0xc
sub ecx, dword [esi + 0xb4]
add dword [esi + 0xa8], ecx
test eax, eax
jne 0x436892
mov eax, dword [ebp - 0x30]
lea edx, [esi + 0x29]
mov dword [esi + 0xb0], edx
mov dword [eax], 0
mov byte [esi + 0x28], 0
jmp 0x43689d
lea edx, [esi + 0x28]
add edx, eax
mov dword [esi + 0xb0], edx
mov al, byte [esi + 0x28]
mov ecx, dword [ebp - 0x14]
mov byte [ebp - 1], al
lea eax, [esi + 0x29]
mov dword [ebp - 0x20], edx
mov ebx, edi
mov edx, eax
mov dword [ebx], edx
mov edx, dword [ebp - 0x30]
mov ebx, dword [ebp - 0x34]
mov dword [ebp - 8], edx
mov dl, byte [ebp - 1]
mov byte [ecx + ebx + 2], dl
cmp eax, dword [ebp - 0x20]
jae 0x4368de
mov bl, byte [eax]
mov byte [ebp - 1], bl
mov ebx, dword [ebp - 0x34]
jmp 0x43693e
mov dword [ebp - 0x30], edx
mov byte [ecx + ebx + 2], 0
mov dword [ebp - 8], edx
jmp 0x4368e1
mov edx, dword [ebp - 0x30]
cmp dword [edx], 0
je 0x43695a
push dword [esi + 0x24]
lea eax, [esi + 0x28]
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x10]
call eax
mov ecx, dword [edi]
add esp, 0xc
sub ecx, dword [esi + 0xb4]
add dword [esi + 0xa8], ecx
lea ecx, [esi + 0x28]
mov dword [edi], ecx
test eax, eax
jne 0x436926
mov eax, dword [ebp - 0x30]
lea edx, [esi + 0x29]
mov dword [esi + 0xb0], edx
mov dword [eax], 0
mov byte [ecx], 0
jmp 0x436931
lea edx, [esi + 0x28]
add edx, eax
mov dword [esi + 0xb0], edx
mov eax, dword [edi]
mov dword [ebp - 0x20], edx
mov cl, byte [eax]
mov byte [ebp - 1], cl
mov ecx, dword [ebp - 0x14]
mov dl, byte [ebp - 1]
inc eax
mov dword [edi], eax
mov byte [ecx + ebx + 1], dl
cmp eax, dword [ebp - 0x20]
jae 0x436961
mov dl, byte [eax]
inc eax
mov byte [ebp - 1], dl
lea edx, [esi + 0x20]
mov dword [edi], eax
jmp 0x4369d4
mov byte [ecx + ebx + 1], 0
jmp 0x436964
mov edx, dword [ebp - 0x30]
cmp dword [edx], 0
je 0x4369d0
push dword [esi + 0x24]
lea eax, [esi + 0x28]
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x10]
call eax
mov ecx, dword [edi]
add esp, 0xc
sub ecx, dword [esi + 0xb4]
add dword [esi + 0xa8], ecx
lea ecx, [esi + 0x28]
mov dword [edi], ecx
test eax, eax
jne 0x4369b6
mov eax, dword [ebp - 8]
mov dword [eax], 0
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
mov byte [ecx], 0
mov eax, dword [edi]
mov cl, byte [eax]
inc eax
mov byte [ebp - 1], cl
mov ecx, dword [ebp - 0x14]
mov dword [edi], eax
jmp 0x4369d7
add eax, 0x28
add eax, esi
mov dword [esi + 0xb0], eax
mov eax, dword [edi]
mov cl, byte [eax]
inc eax
mov byte [ebp - 1], cl
mov ecx, dword [ebp - 0x14]
mov dword [edi], eax
jmp 0x4369d7
mov byte [ebp - 1], 0
mov dword [ebp - 0x30], edx
mov dl, byte [ebp - 1]
mov byte [ecx + ebx], dl
add ecx, 3
cmp dword [ebp - 0x54], 2
mov dword [ebp - 0x14], ecx
jne 0x436a65
cmp eax, dword [esi + 0xb0]
jae 0x4369f8
mov dl, byte [eax]
inc eax
mov dword [edi], eax
jmp 0x436a68
mov eax, dword [ebp - 8]
cmp dword [eax], 0
je 0x436a61
push dword [esi + 0x24]
lea eax, [esi + 0x28]
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x10]
call eax
mov ecx, dword [edi]
add esp, 0xc
sub ecx, dword [esi + 0xb4]
add dword [esi + 0xa8], ecx
lea ecx, [esi + 0x28]
mov dword [edi], ecx
test eax, eax
jne 0x436a4a
mov eax, dword [ebp - 8]
mov dword [eax], 0
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
mov byte [ecx], 0
mov eax, dword [edi]
mov ecx, dword [ebp - 0x14]
mov dl, byte [eax]
inc eax
mov dword [edi], eax
jmp 0x436a68
mov ecx, dword [ebp - 0x14]
add eax, 0x28
add eax, esi
mov dword [esi + 0xb0], eax
mov eax, dword [edi]
mov dl, byte [eax]
inc eax
mov dword [edi], eax
jmp 0x436a68
xor dl, dl
jmp 0x436a68
or dl, 0xff
movzx eax, dl
or dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x5c]
inc eax
mov byte [ecx + ebx], dl
inc ecx
mov dword [ebp - 0x5c], eax
cmp eax, dword [esi]
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x14], ecx
jl 0x436830
jmp 0x436cd4
test eax, eax
jle 0x436cd4
mov ecx, esi
call fcn.0042be00
cmp dword [ebp - 0x40], 0x10
mov edi, eax
je 0x436ab4
mov ecx, esi
call fcn.0042be00
shl eax, 0x10
add eax, edi
mov dword [ebp - 8], eax
mov edi, eax
mov ecx, dword [ebp - 0x44]
mov edx, edi
and edx, dword [ebp - 0x50]
mov eax, edx
shr eax, cl
mov ecx, dword [ebp - 0x88]
shl edx, cl
cmp dword [ebp - 0x44], 0
cmovge edx, eax
mov dword [ebp - 8], edx
cmp edx, 0x100
jb 0x436af2
push 0x155c
push str.D:GABRIELEprogrammazioneVisual_StudioOpenGLTurorialOpenGLTurorial_src_vendor_stb_stb_image.h
push str.v___256
call dword [ebp - 0x2c]
mov edx, dword [ebp - 8]
add esp, 0xc
mov ecx, dword [ebp - 0x68]
shr edx, cl
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 8], edx
cmp ecx, 8
jbe 0x436b1d
push 0x155e
push str.D:GABRIELEprogrammazioneVisual_StudioOpenGLTurorialOpenGLTurorial_src_vendor_stb_stb_image.h
push str.bits___0__bits___8
call dword [ebp - 0x2c]
mov edx, dword [ebp - 8]
add esp, 0xc
mov ecx, dword [ebp - 0x18]
mov eax, dword [ecx*4 + 0x496e54]
mov ecx, dword [ecx*4 + 0x496ea8]
imul eax, edx
mov edx, edi
and edx, dword [ebp - 0x24]
sar eax, cl
mov ecx, dword [ebp - 0x14]
mov byte [ecx + ebx], al
inc ecx
mov eax, edx
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp - 0x48]
shr eax, cl
mov ecx, dword [ebp - 0x6c]
shl edx, cl
cmp dword [ebp - 0x48], 0
cmovge edx, eax
mov dword [ebp - 8], edx
cmp edx, 0x100
jb 0x436b75
push 0x155c
push str.D:GABRIELEprogrammazioneVisual_StudioOpenGLTurorialOpenGLTurorial_src_vendor_stb_stb_image.h
push str.v___256
call dword [ebp - 0x2c]
mov edx, dword [ebp - 8]
add esp, 0xc
mov ecx, dword [ebp - 0x70]
shr edx, cl
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 8], edx
cmp ecx, 8
jbe 0x436ba0
push 0x155e
push str.D:GABRIELEprogrammazioneVisual_StudioOpenGLTurorialOpenGLTurorial_src_vendor_stb_stb_image.h
push str.bits___0__bits___8
call dword [ebp - 0x2c]
mov edx, dword [ebp - 8]
add esp, 0xc
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ecx*4 + 0x496e54]
mov ecx, dword [ecx*4 + 0x496ea8]
imul eax, edx
mov edx, edi
and edx, dword [ebp - 0x60]
sar eax, cl
mov ecx, dword [ebp - 0x14]
mov byte [ecx + ebx], al
inc ecx
mov eax, edx
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp - 0x10]
shr eax, cl
mov ecx, dword [ebp - 0x74]
shl edx, cl
cmp dword [ebp - 0x10], 0
cmovge edx, eax
mov dword [ebp - 8], edx
cmp edx, 0x100
jb 0x436bf8
push 0x155c
push str.D:GABRIELEprogrammazioneVisual_StudioOpenGLTurorialOpenGLTurorial_src_vendor_stb_stb_image.h
push str.v___256
call dword [ebp - 0x2c]
mov edx, dword [ebp - 8]
add esp, 0xc
mov ecx, dword [ebp - 0x78]
shr edx, cl
mov ecx, dword [ebp - 0x38]
mov dword [ebp - 8], edx
cmp ecx, 8
jbe 0x436c23
push 0x155e
push str.D:GABRIELEprogrammazioneVisual_StudioOpenGLTurorialOpenGLTurorial_src_vendor_stb_stb_image.h
push str.bits___0__bits___8
call dword [ebp - 0x2c]
mov edx, dword [ebp - 8]
add esp, 0xc
mov ecx, dword [ebp - 0x38]
mov eax, dword [ecx*4 + 0x496e54]
mov ecx, dword [ecx*4 + 0x496ea8]
imul eax, edx
sar eax, cl
mov ecx, dword [ebp - 0x14]
mov byte [ecx + ebx], al
inc ecx
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x14], ecx
test eax, eax
je 0x436cb6
mov edx, dword [ebp - 0x3c]
and edi, eax
mov eax, edi
mov ecx, edx
shr eax, cl
mov ecx, dword [ebp - 0x7c]
shl edi, cl
test edx, edx
cmovns edi, eax
cmp edi, 0x100
jb 0x436c79
push 0x155c
push str.D:GABRIELEprogrammazioneVisual_StudioOpenGLTurorialOpenGLTurorial_src_vendor_stb_stb_image.h
push str.v___256
call dword [ebp - 0x2c]
add esp, 0xc
mov ecx, dword [ebp - 0x80]
shr edi, cl
mov ecx, dword [ebp - 0x28]
cmp ecx, 8
jbe 0x436c9e
push 0x155e
push str.D:GABRIELEprogrammazioneVisual_StudioOpenGLTurorialOpenGLTurorial_src_vendor_stb_stb_image.h
push str.bits___0__bits___8
call dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x28]
add esp, 0xc
mov eax, dword [ecx*4 + 0x496e54]
mov ecx, dword [ecx*4 + 0x496ea8]
imul eax, edi
sar eax, cl
mov ecx, dword [ebp - 0x14]
jmp 0x436cbb
mov eax, 0xff
or dword [ebp - 0x58], eax
mov byte [ecx + ebx], al
inc ecx
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp - 0x5c]
inc ecx
mov dword [ebp - 0x5c], ecx
cmp ecx, dword [esi]
jl 0x436a94
mov edx, dword [ebp - 0x84]
test edx, edx
je 0x436d14
cmp dword [esi + 0x10], 0
je 0x436d0e
mov eax, dword [esi + 0xb0]
mov ecx, eax
sub ecx, dword [esi + 0xac]
cmp ecx, edx
jge 0x436d0e
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 0x436d14
add dword [esi + 0xac], edx
mov eax, dword [ebp - 0x4c]
mov edx, dword [esi + 4]
inc eax
mov dword [ebp - 0x4c], eax
mov ecx, edx
cmp eax, edx
jl 0x436800
cmp dword [ebp - 0x58], 0
jne 0x436d4c
mov eax, dword [esi]
imul eax, edx
lea eax, [eax*4 - 1]
test eax, eax
js 0x436d4c
nop
mov byte [eax + ebx], 0xff
sub eax, 4
jns 0x436d40
mov ecx, dword [esi + 4]
cmp dword [ebp - 0x64], 0
jle 0x436db6
xor edi, edi
mov dword [ebp - 0x4c], edi
test ecx, 0xfffffffe
jle 0x436db6
nop
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 - 0x64], edx
lea edx, [ecx + ebx]
test eax, eax
jle 0x436da4
mov ebx, dword [ebp - 0x64]
sub ebx, ecx
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 0x436d87
mov ebx, dword [ebp - 0x34]
mov edi, dword [ebp - 0x4c]
mov ecx, dword [esi + 4]
inc edi
mov eax, ecx
mov dword [ebp - 0x4c], edi
sar eax, 1
cmp edi, eax
jl 0x436d60
mov ecx, dword [ebp - 0x8c]
mov eax, dword [esi]
mov dword [ecx], eax
mov eax, dword [ebp + 8]
mov ecx, dword [esi + 4]
mov dword [eax], ecx
mov ecx, dword [ebp + 0xc]
test ecx, ecx
je 0x436dd4
mov eax, dword [esi + 8]
mov dword [ecx], eax
pop edi
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
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
mov eax, dword fs:[0x2c]
pop edi
pop ebx
pop esi
mov eax, dword [eax]
mov dword [eax + 0xc], str.bad_header
xor eax, eax
mov esp, ebp
pop ebp
ret