Function at 0x40d380
Capabilities:
Encrypt data using rc4 ksa
Resolve function by parsing pe exports

Disassembly:
push ebp
push edi
push esi
push ebx
mov ebx, ecx
sub esp, 0x8c
cmp dword [esp + 0xac], 0x10
mov dword [esp + 0x38], eax
mov dword [esp + 0x2c], edx
mov eax, dword [esp + 0xa0]
je 0x40d4f0
mov dword [esp + 0x14], eax
mov edi, 1
mov ebp, 1
mov eax, dword [esp + 0x38]
mov eax, dword [eax]
mov eax, dword [eax + 8]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0xa4]
or eax, dword [esp + 0xa8]
js 0x40d428
mov eax, dword [esp + 0xa4]
mov ecx, dword [esp + 0xa8]
mov dword [esp + 0x48], eax
test ecx, ecx
je 0x40d452
mov eax, 0x7fffffff
xor edx, edx
idiv dword [esp + 0xa8]
cmp dword [esp + 0xa4], eax
jg 0x40d428
mov eax, dword [esp + 0x14]
test eax, eax
js 0x40d428
imul ecx, dword [esp + 0xa4]
test eax, eax
je 0x40d45a
mov esi, eax
xor edx, edx
mov eax, 0x7fffffff
idiv esi
cmp ecx, eax
jle 0x40d45a
lea esi, [esi]
mov eax, dword [esp + 0x38]
mov dword [eax + 0xc], 0
mov dword [esp], 0x4e9010
call sym.___emutls_get_address
mov dword [eax], str.Out_of_memory
add esp, 0x8c
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [esp + 0x14]
test edx, edx
js 0x40d428
mov eax, dword [esp + 0x14]
imul ecx, eax
mov dword [esp], ecx
call sym._malloc
mov ecx, eax
mov eax, dword [esp + 0x38]
mov dword [eax + 0xc], ecx
test ecx, ecx
je 0x40d433
mov eax, dword [esp + 0x3c]
test eax, eax
js 0x40d4d0
mov eax, dword [esp + 0xa4]
test eax, eax
je 0x40d505
mov eax, 0x7fffffff
xor edx, edx
mov esi, dword [esp + 0x3c]
idiv dword [esp + 0xa4]
cmp esi, eax
jg 0x40d4d0
mov eax, dword [esp + 0xac]
test eax, eax
js 0x40d4d0
je 0x40d510
mov eax, 0x7fffffff
imul esi, dword [esp + 0xa4]
xor edx, edx
idiv dword [esp + 0xac]
cmp esi, eax
jle 0x40eac2
lea esi, [esi]
mov dword [esp], 0x4e9010
call sym.___emutls_get_address
mov dword [eax], str.Corrupt_PNG
jmp 0x40d445
add eax, eax
mov edi, 2
mov ebp, 2
mov dword [esp + 0x14], eax
jmp 0x40d3b7
mov eax, dword [esp + 0xac]
test eax, eax
js 0x40d4d0
mov eax, dword [esp + 0x3c]
imul eax, dword [esp + 0xa4]
mov dword [esp + 0x6c], eax
imul eax, dword [esp + 0xac]
add eax, 7
shr eax, 3
mov dword [esp + 0x4c], eax
add eax, 1
imul eax, dword [esp + 0xa8]
cmp ebx, eax
jb 0x40d4d0
mov eax, dword [esp + 0xa8]
test eax, eax
je 0x40e8f3
mov eax, dword [esp + 0xa0]
imul eax, dword [esp + 0xa4]
mov dword [esp + 0x40], 0
mov dword [esp + 0x34], 0
imul edi, eax
mov dword [esp + 0x64], eax
mov eax, dword [esp + 0x3c]
imul ebp, eax
cmp dword [esp + 0xac], 7
setle dl
cmp dword [esp + 0xa0], eax
mov dword [esp + 0x44], edi
sete al
or edx, eax
mov dword [esp + 0x28], ebp
mov ebp, ecx
mov byte [esp + 0x50], dl
lea esi, [esi]
mov eax, dword [esp + 0x40]
add ebp, eax
mov eax, dword [esp + 0x2c]
movzx edx, byte [eax]
lea edi, [eax + 1]
cmp edx, 4
jg 0x40d4d0
cmp dword [esp + 0xac], 7
jg 0x40d710
mov eax, dword [esp + 0x4c]
cmp dword [esp + 0xa4], eax
jb 0x40d4d0
mov esi, eax
mov eax, dword [esp + 0x64]
mov dword [esp + 0x48], esi
sub eax, esi
mov esi, dword [esp + 0x44]
add ebp, eax
mov eax, ebp
sub eax, esi
mov esi, dword [esp + 0x34]
mov dword [esp + 0x18], eax
test esi, esi
jne 0x40d609
movzx edx, byte [edx + 0x4ec9f0]
test edx, edx
je 0x40e81f
mov dword [esp + 0x28], 1
cmp edx, 1
je 0x40dab0
cmp edx, 2
je 0x40db49
mov esi, dword [esp + 0x28]
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x1c], ebp
mov eax, edi
mov dword [esp + 0x10], ebp
add esi, edi
jmp 0x40d66c
cmp edx, 3
je 0x40d6f0
mov ebp, dword [esp + 0x10]
movzx ecx, byte [ebx]
add cl, byte [eax]
mov byte [ebp], cl
add eax, 1
add dword [esp + 0x10], 1
add ebx, 1
cmp eax, esi
je 0x40d691
cmp edx, 5
je 0x40d678
jle 0x40d648
cmp edx, 6
jne 0x40d65d
movzx ecx, byte [eax]
mov ebp, dword [esp + 0x10]
add eax, 1
add ebx, 1
mov byte [ebp], cl
add dword [esp + 0x10], 1
cmp eax, esi
jne 0x40d66c
mov ebp, dword [esp + 0x1c]
cmp dword [esp + 0xac], 8
je 0x40d7d8
cmp dword [esp + 0xac], 0x10
je 0x40da68
lea eax, [ebp + 1]
add dword [esp + 0x2c], 2
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x18]
add eax, 1
cmp byte [esp + 0x50], 0
je 0x40d815
mov edi, dword [esp + 0x48]
mov ebp, dword [esp + 0x28]
lea ecx, [edi - 1]
imul ebp, ecx
cmp edx, 6
ja case.default.0x40d6e6
jmp dword [edx*4 + 0x4ea864]
movzx ecx, byte [ebx]
shr cl, 1
mov ebp, ecx
movzx ecx, byte [eax]
add ebp, ecx
mov ecx, ebp
mov ebp, dword [esp + 0x10]
mov byte [ebp], cl
jmp 0x40d65d
mov esi, dword [esp + 0x44]
mov eax, ebp
mov ebx, dword [esp + 0x34]
sub eax, esi
mov dword [esp + 0x18], eax
test ebx, ebx
jne 0x40d72b
movzx edx, byte [edx + 0x4ec9f0]
mov ecx, dword [esp + 0x28]
test ecx, ecx
jle 0x40d695
test edx, edx
jne 0x40d619
mov esi, dword [esp + 0x28]
lea eax, [esi - 1]
mov ecx, esi
cmp eax, 3
jbe 0x40e82c
mov eax, ebp
or eax, edi
test al, 3
jne 0x40e82c
mov eax, dword [esp + 0x2c]
lea edx, [eax + 2]
mov eax, ebp
sub eax, edx
cmp eax, 2
jbe 0x40e82c
and esi, 0xfffffffc
mov eax, edi
mov edx, ebp
mov ebx, esi
lea ecx, [edi + esi]
lea esi, [esi]
mov esi, dword [eax]
add eax, 4
add edx, 4
mov dword [edx - 4], esi
cmp eax, ecx
jne 0x40d780
mov esi, dword [esp + 0x28]
cmp esi, ebx
je 0x40d7c4
mov eax, esi
and eax, 0xfffffffc
movzx edx, byte [edi + eax]
mov byte [ebp + eax], dl
lea eax, [ebx + 1]
cmp esi, eax
jle 0x40d7c4
movzx eax, byte [edi + ebx + 1]
mov byte [ebp + ebx + 1], al
lea eax, [ebx + 2]
cmp esi, eax
jle 0x40d7c4
movzx eax, byte [edi + ebx + 2]
mov byte [ebp + ebx + 2], al
xor edx, edx
cmp dword [esp + 0xac], 8
jne 0x40d6a3
lea esi, [esi]
mov eax, dword [esp + 0x3c]
cmp dword [esp + 0xa0], eax
je 0x40d7ea
mov byte [ebp + eax], 0xff
mov eax, dword [esp + 0x3c]
add ebp, dword [esp + 0xa0]
mov dword [esp + 0x10], ebp
add eax, edi
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x18]
add eax, dword [esp + 0xa0]
cmp byte [esp + 0x50], 0
jne 0x40d6cf
cmp edx, 6
ja case.default.0x40d81e
jmp dword [edx*4 + 0x4ea880]
mov eax, dword [esp + 0x2c]
mov dword [esp + 8], ebp
mov dword [esp + 4], eax
mov eax, dword [esp + 0x10]
mov dword [esp], eax
call sym._memcpy
lea esi, [esi]
add dword [esp + 0x2c], ebp
mov eax, dword [esp + 0x34]
mov ebx, dword [esp + 0x44]
add dword [esp + 0x40], ebx
add eax, 1
cmp dword [esp + 0xa8], eax
je 0x40e894
mov edi, dword [esp + 0x38]
mov dword [esp + 0x34], eax
mov ebp, dword [edi + 0xc]
jmp 0x40d5a8
mov ebx, dword [esp + 0xa4]
sub ebx, 1
je 0x40e876
mov edi, dword [esp + 0x28]
mov eax, dword [esp + 0x14]
mov dword [esp + 0x7c], ebx
mov ebp, dword [esp + 0x10]
mov esi, dword [esp + 0x10]
mov dword [esp + 0x1c], ebx
lea ecx, [edi - 1]
mov dword [esp + 0x20], ecx
mov ecx, edi
sub ebp, eax
and ecx, 0xfffffffc
mov dword [esp + 0x18], ebp
mov ebp, dword [esp + 0x28]
mov edi, ecx
mov dword [esp + 0x24], ecx
sub ecx, eax
lea edx, [edi + 2]
mov dword [esp + 0x60], ecx
lea ecx, [edi + 1]
mov dword [esp + 0x68], ecx
sub ecx, eax
mov dword [esp + 0x74], edx
sub edx, eax
mov dword [esp + 0x70], ecx
mov ecx, eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x78], edx
mov edx, 1
mov ebx, ecx
sub edx, ecx
mov dword [esp + 0x5c], edi
mov dword [esp + 0x58], edx
lea esi, [esi]
nop
lea ecx, [eax + ebp]
test ebp, ebp
jle 0x40d9e3
cmp dword [esp + 0x20], 2
jbe 0x40e7c0
mov edi, dword [esp + 0x18]
mov edx, esi
mov ecx, esi
or edx, eax
or edx, edi
lea edi, [eax + 1]
and edx, 3
sete dl
sub ecx, edi
cmp ecx, 2
seta cl
test dl, cl
je 0x40e7c0
mov edx, dword [esp + 0x58]
neg edx
cmp edx, 2
jbe 0x40e7c0
mov dword [esp + 0x10], eax
xor ecx, ecx
mov dword [esp + 0x54], ebx
mov dword [esp + 0x30], ebp
mov ebp, dword [esp + 0x24]
lea esi, [esi]
mov eax, dword [esp + 0x10]
lea edi, [eax + ecx]
mov eax, dword [esp + 0x18]
movzx edx, word [edi]
movzx edi, word [edi + 2]
lea ebx, [eax + ecx]
movzx eax, word [ebx]
movzx ebx, word [ebx + 2]
add dl, al
add dh, ah
mov eax, edi
add al, bl
movzx edx, dx
add ah, bh
mov edi, eax
shl edi, 0x10
or edx, edi
mov dword [esi + ecx], edx
add ecx, 4
cmp ecx, ebp
jne 0x40d950
mov eax, dword [esp + 0x10]
mov ebp, dword [esp + 0x30]
mov edi, dword [esp + 0x24]
mov ebx, dword [esp + 0x54]
lea ecx, [eax + ebp]
cmp ebp, edi
je 0x40d9e3
mov edi, dword [esp + 0x5c]
movzx edx, byte [eax + edi]
mov edi, dword [esp + 0x60]
add dl, byte [esi + edi]
mov edi, dword [esp + 0x5c]
mov byte [esi + edi], dl
mov edi, dword [esp + 0x68]
cmp ebp, edi
jle 0x40d9e3
mov edx, dword [esp + 0x70]
movzx edx, byte [esi + edx]
add dl, byte [eax + edi]
mov byte [esi + edi], dl
mov edi, dword [esp + 0x74]
cmp edi, ebp
jge 0x40d9e3
mov edx, dword [esp + 0x78]
movzx eax, byte [eax + edi]
add al, byte [esi + edx]
mov byte [esi + edi], al
add dword [esp + 0x18], ebx
mov eax, ecx
mov byte [esi + ebp], 0xff
add esi, ebx
sub dword [esp + 0x1c], 1
jne 0x40d8f0
mov ebx, dword [esp + 0x7c]
mov eax, dword [esp + 0x28]
imul ebx, eax
add dword [esp + 0x2c], ebx
cmp dword [esp + 0xac], 0x10
jne 0x40d844
mov edi, dword [esp + 0x38]
mov edx, dword [esp + 0xa4]
mov eax, dword [esp + 0x40]
add eax, dword [edi + 0xc]
test edx, edx
je 0x40d844
mov edi, dword [esp + 0x28]
mov ecx, dword [esp + 0x14]
mov ebx, dword [esp + 0xa4]
lea edx, [eax + edi + 1]
xor eax, eax
lea esi, [esi]
lea esi, [esi]
add eax, 1
mov byte [edx], 0xff
add edx, ecx
cmp eax, ebx
jb 0x40da50
jmp 0x40d844
mov eax, dword [esp + 0x3c]
cmp dword [esp + 0xa0], eax
je 0x40da85
mov eax, dword [esp + 0x28]
movzx esi, word [0x4ece6c]
mov word [ebp + eax], si
mov eax, dword [esp + 0x28]
add eax, edi
mov edi, dword [esp + 0x14]
mov dword [esp + 0x2c], eax
lea eax, [ebp + edi]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x18]
add eax, edi
jmp 0x40d6c4
mov esi, dword [esp + 0x28]
lea eax, [esi - 1]
cmp eax, 3
jbe 0x40e6fb
mov eax, ebp
or eax, edi
test al, 3
jne 0x40e6fb
mov eax, dword [esp + 0x2c]
lea ecx, [eax + 2]
mov eax, ebp
sub eax, ecx
cmp eax, 2
jbe 0x40e6fb
mov dword [esp + 0x10], edx
and esi, 0xfffffffc
mov eax, edi
mov ecx, ebp
lea ebx, [edi + esi]
nop
mov edx, dword [eax]
add eax, 4
add ecx, 4
mov dword [ecx - 4], edx
cmp eax, ebx
jne 0x40daf0
mov ebx, dword [esp + 0x28]
mov edx, dword [esp + 0x10]
cmp ebx, esi
je 0x40d695
mov eax, ebx
and eax, 0xfffffffc
movzx ecx, byte [edi + eax]
mov byte [ebp + eax], cl
lea eax, [esi + 1]
cmp eax, ebx
jge 0x40d695
movzx eax, byte [edi + esi + 1]
mov byte [ebp + esi + 1], al
lea eax, [esi + 2]
cmp eax, ebx
jge 0x40d695
movzx eax, byte [edi + esi + 2]
mov byte [ebp + esi + 2], al
jmp 0x40d695
mov eax, dword [esp + 0x28]
sub eax, 1
cmp eax, 2
jbe 0x40e727
mov esi, dword [esp + 0x18]
mov ecx, ebp
mov eax, esi
lea ebx, [esi + 1]
or eax, ebp
or eax, edi
test al, 3
sete al
sub ecx, ebx
cmp ecx, 2
seta cl
test al, cl
je 0x40e727
mov esi, dword [esp + 0x2c]
lea ecx, [esi + 2]
mov esi, ebp
sub esi, ecx
cmp esi, 2
jbe 0x40e727
mov eax, dword [esp + 0x28]
mov dword [esp + 0x10], edx
xor ebx, ebx
mov dword [esp + 0x1c], edi
and eax, 0xfffffffc
mov edi, eax
lea esi, [esi]
mov eax, dword [esp + 0x2c]
lea esi, [eax + ebx]
mov eax, dword [esp + 0x18]
lea edx, [eax + ebx]
movzx eax, word [esi + 1]
movzx ecx, word [edx]
movzx edx, word [edx + 2]
add al, cl
add ah, ch
movzx ecx, word [esi + 3]
movzx eax, ax
add cl, dl
add ch, dh
shl ecx, 0x10
or eax, ecx
mov dword [ebp + ebx], eax
add ebx, 4
cmp ebx, edi
jne 0x40dba8
mov esi, dword [esp + 0x28]
mov edx, dword [esp + 0x10]
mov edi, dword [esp + 0x1c]
cmp esi, ebx
je 0x40d695
mov ecx, dword [esp + 0x18]
mov eax, esi
and eax, 0xfffffffc
movzx ecx, byte [ecx + eax]
add cl, byte [edi + eax]
mov byte [ebp + eax], cl
lea eax, [ebx + 1]
cmp eax, esi
jge 0x40d695
mov ecx, dword [esp + 0x18]
movzx eax, byte [edi + ebx + 1]
add al, byte [ecx + ebx + 1]
mov byte [ebp + ebx + 1], al
lea eax, [ebx + 2]
cmp eax, esi
jge 0x40d695
movzx eax, byte [ecx + ebx + 2]
add al, byte [edi + ebx + 2]
mov byte [ebp + ebx + 2], al
jmp 0x40d695
mov eax, dword [esp + 0xa4]
sub eax, 1
je 0x40e876
mov esi, dword [esp + 0x2c]
mov ebp, dword [esp + 0x28]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], eax
mov edi, dword [esp + 0x10]
lea ebx, [esi + ebp]
mov eax, esi
mov esi, dword [esp + 0x14]
nop
mov edx, edi
mov ecx, eax
sub edx, esi
test ebp, ebp
jle 0x40dc9a
mov dword [esp + 0x10], edi
mov edi, edx
movzx edx, byte [edi]
add ecx, 1
add edi, 1
shr dl, 1
add dl, byte [ecx - 1]
mov byte [edi + esi - 1], dl
cmp ecx, ebx
jne 0x40dc80
mov edi, dword [esp + 0x10]
mov byte [edi + ebp], 0xff
add eax, ebp
add edi, esi
add ebx, ebp
sub dword [esp + 0x18], 1
jne 0x40dc70
mov eax, dword [esp + 0x1c]
mov edi, dword [esp + 0x28]
imul eax, edi
add dword [esp + 0x2c], eax
cmp dword [esp + 0xac], 0x10
jne 0x40d844
jmp 0x40da17
mov ebx, dword [esp + 0xa4]
sub ebx, 1
je 0x40e876
mov ecx, dword [esp + 0x28]
mov esi, dword [esp + 0x2c]
mov dword [esp + 0x70], ebx
mov dword [esp + 0x68], ebx
lea edi, [esi + ecx]
mov dword [esp + 0x30], edi
mov edi, dword [esp + 0x14]
sub eax, edi
mov edx, eax
mov eax, ecx
mov ecx, edx
mov edx, dword [esp + 0x10]
lea esi, [esi]
mov ebx, dword [esp + 0x14]
mov ebp, edx
mov edi, ecx
mov dword [esp + 0x10], esi
sub ebp, ebx
add ecx, ebx
mov ebx, ebp
test eax, eax
jle 0x40dddb
mov dword [esp + 0x54], edx
mov ebp, ebx
mov dword [esp + 0x58], esi
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], ecx
lea esi, [esi]
mov eax, dword [esp + 0x10]
mov ebx, dword [esp + 0x14]
movzx esi, byte [ebp]
movzx ecx, byte [edi]
movzx ebx, byte [edi + ebx]
movzx eax, byte [eax]
mov dword [esp + 0x18], esi
mov edx, esi
mov byte [esp + 0x1c], al
lea eax, [ebx + esi]
sub eax, ecx
mov byte [esp + 0x24], bl
mov esi, eax
mov byte [esp + 0x20], cl
sub esi, ebx
mov ebx, esi
neg ebx
cmovs ebx, esi
mov esi, eax
sub esi, ecx
mov ecx, esi
neg ecx
cmovs ecx, esi
mov esi, dword [esp + 0x18]
sub eax, esi
mov esi, eax
neg esi
cmovns eax, esi
cmp ebx, ecx
mov esi, ecx
cmovle esi, ebx
cmp eax, esi
jle 0x40dda4
cmp ebx, ecx
movzx eax, byte [esp + 0x20]
movzx ebx, byte [esp + 0x24]
cmovle eax, ebx
mov edx, eax
mov eax, dword [esp + 0x14]
add dl, byte [esp + 0x1c]
add edi, 1
add ebp, 1
add dword [esp + 0x10], 1
mov ebx, dword [esp + 0x30]
mov byte [ebp + eax - 1], dl
mov eax, dword [esp + 0x10]
cmp eax, ebx
jne 0x40dd38
mov edx, dword [esp + 0x54]
mov esi, dword [esp + 0x58]
mov eax, dword [esp + 0x5c]
mov ecx, dword [esp + 0x60]
mov edi, dword [esp + 0x14]
add dword [esp + 0x30], eax
add esi, eax
mov byte [edx + eax], 0xff
add edx, edi
sub dword [esp + 0x68], 1
jne 0x40dd08
mov ebx, dword [esp + 0x70]
mov eax, dword [esp + 0x28]
imul ebx, eax
add dword [esp + 0x2c], ebx
cmp dword [esp + 0xac], 0x10
jne 0x40d844
jmp 0x40da17
mov edx, dword [esp + 0xa4]
sub edx, 1
je 0x40e876
mov ecx, dword [esp + 0x10]
mov esi, dword [esp + 0x2c]
mov dword [esp + 0x20], edx
mov edi, dword [esp + 0x14]
mov ebp, dword [esp + 0x28]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x10], esi
mov ebx, ecx
mov esi, dword [esp + 0x14]
sub ebx, edi
mov edi, ecx
nop
xor ecx, ecx
test ebp, ebp
jle 0x40de81
mov dword [esp + 0x18], esi
lea esi, [esi]
movzx esi, byte [ebx + ecx]
movzx edx, byte [eax + ecx]
add edx, esi
mov esi, dword [esp + 0x10]
sar edx, 1
add dl, byte [esi + ecx]
mov byte [edi + ecx], dl
add ecx, 1
cmp ecx, ebp
jne 0x40de60
mov esi, dword [esp + 0x18]
add dword [esp + 0x10], ebp
add eax, esi
add ebx, esi
mov byte [edi + ebp], 0xff
add edi, esi
sub dword [esp + 0x1c], 1
jne 0x40de50
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x28]
imul edx, eax
add dword [esp + 0x2c], edx
cmp dword [esp + 0xac], 0x10
jne 0x40d844
jmp 0x40da17
mov ecx, dword [esp + 0xa4]
sub ecx, 1
je 0x40e876
mov ebx, dword [esp + 0x28]
mov dword [esp + 0x18], eax
mov ebp, ecx
mov dword [esp + 0x60], ecx
mov ecx, dword [esp + 0x10]
lea edi, [ebx - 1]
mov dword [esp + 0x20], edi
mov edi, ebx
and edi, 0xfffffffc
mov dword [esp + 0x1c], edi
mov edi, ebx
and edi, 0xfffffffc
lea esi, [edi + 1]
mov dword [esp + 0x58], edi
mov dword [esp + 0x54], esi
lea esi, [edi + 2]
mov edi, ebx
mov dword [esp + 0x5c], esi
mov esi, dword [esp + 0x2c]
lea esi, [esi]
nop
test edi, edi
jle 0x40dfef
cmp dword [esp + 0x20], 2
jbe 0x40e760
mov ebx, dword [esp + 0x18]
mov eax, ecx
mov edx, ecx
or eax, esi
or eax, ebx
lea ebx, [esi + 1]
test al, 3
sete al
sub edx, ebx
cmp edx, 2
seta dl
test al, dl
je 0x40e760
mov ebx, dword [esp + 0x18]
mov eax, ecx
lea edx, [ebx + 1]
sub eax, edx
cmp eax, 2
jbe 0x40e760
mov dword [esp + 0x10], ecx
xor edx, edx
mov dword [esp + 0x30], edi
mov dword [esp + 0x24], ebp
mov ebp, ebx
lea esi, [esi]
nop
lea ebx, [esi + edx]
lea edi, [ebp + edx]
movzx ecx, word [ebx]
movzx eax, word [edi]
movzx edi, word [edi + 2]
movzx ebx, word [ebx + 2]
add al, cl
add ah, ch
mov ecx, edi
add cl, bl
movzx eax, ax
add ch, bh
mov edi, ecx
shl edi, 0x10
or eax, edi
mov edi, dword [esp + 0x10]
mov dword [edi + edx], eax
mov eax, dword [esp + 0x1c]
add edx, 4
cmp edx, eax
jne 0x40df70
mov ecx, edi
mov edi, dword [esp + 0x30]
mov ebp, dword [esp + 0x24]
cmp edi, eax
je 0x40dfef
mov ebx, dword [esp + 0x58]
mov edx, dword [esp + 0x18]
movzx eax, byte [edx + ebx]
add al, byte [esi + ebx]
mov byte [ecx + ebx], al
mov ebx, dword [esp + 0x54]
cmp ebx, edi
jge 0x40dfef
movzx eax, byte [esi + ebx]
add al, byte [edx + ebx]
mov byte [ecx + ebx], al
mov ebx, dword [esp + 0x5c]
cmp edi, ebx
jle 0x40dfef
movzx eax, byte [esi + ebx]
add al, byte [edx + ebx]
mov byte [ecx + ebx], al
mov eax, dword [esp + 0x14]
mov byte [ecx + edi], 0xff
add esi, edi
add dword [esp + 0x18], eax
add ecx, eax
sub ebp, 1
jne 0x40df10
mov ecx, dword [esp + 0x60]
mov eax, dword [esp + 0x28]
imul ecx, eax
add dword [esp + 0x2c], ecx
cmp dword [esp + 0xac], 0x10
jne 0x40d844
jmp 0x40da17
mov eax, dword [esp + 0xa4]
sub eax, 1
je 0x40e876
mov edi, dword [esp + 0x28]
mov ebx, dword [esp + 0x2c]
mov dword [esp + 0x58], eax
mov dword [esp + 0x18], eax
lea esi, [edi - 1]
lea ecx, [ebx + edi]
mov ebp, edi
mov dword [esp + 0x1c], esi
mov esi, edi
and esi, 0xfffffffc
mov dword [esp + 0x20], esi
mov esi, edi
and esi, 0xfffffffc
lea edx, [esi + 1]
mov dword [esp + 0x24], esi
add esi, 2
mov dword [esp + 0x30], edx
mov dword [esp + 0x54], esi
mov esi, dword [esp + 0x10]
lea esi, [esi]
test ebp, ebp
jle 0x40e10c
cmp dword [esp + 0x1c], 3
jbe 0x40e790
lea edi, [ebx + 1]
mov eax, esi
mov dword [esp + 0x10], esi
mov edx, ebx
sub eax, edi
cmp eax, 2
jbe 0x40e790
mov edi, ebx
or edi, esi
and edi, 3
jne 0x40e790
mov eax, dword [esp + 0x20]
mov dword [esp + 0x10], ecx
lea edi, [eax + esi]
mov eax, esi
lea esi, [esi]
nop
mov ecx, dword [edx]
add eax, 4
add edx, 4
mov dword [eax - 4], ecx
cmp eax, edi
jne 0x40e0c8
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x10]
cmp ebp, eax
je 0x40e10c
mov edi, dword [esp + 0x24]
movzx eax, byte [ebx + edi]
mov byte [esi + edi], al
mov edi, dword [esp + 0x30]
cmp edi, ebp
jge 0x40e10c
movzx eax, byte [ebx + edi]
mov byte [esi + edi], al
mov edi, dword [esp + 0x54]
cmp edi, ebp
jge 0x40e10c
movzx eax, byte [ebx + edi]
mov byte [esi + edi], al
mov eax, dword [esp + 0x14]
mov byte [esi + ebp], 0xff
add ebx, ebp
add ecx, ebp
add esi, eax
sub dword [esp + 0x18], 1
jne 0x40e080
mov eax, dword [esp + 0x58]
mov edi, dword [esp + 0x28]
imul eax, edi
add dword [esp + 0x2c], eax
cmp dword [esp + 0xac], 0x10
jne 0x40d844
jmp 0x40da17
mov ebx, dword [esp + 0xa4]
sub ebx, 1
je 0x40e876
mov edi, dword [esp + 0x28]
mov eax, dword [esp + 0x14]
mov dword [esp + 0x7c], ebx
mov ebp, dword [esp + 0x10]
mov esi, dword [esp + 0x10]
mov dword [esp + 0x1c], ebx
lea ecx, [edi - 1]
mov dword [esp + 0x20], ecx
mov ecx, edi
sub ebp, eax
and ecx, 0xfffffffc
mov dword [esp + 0x18], ebp
mov ebp, dword [esp + 0x28]
mov edi, ecx
mov dword [esp + 0x24], ecx
sub ecx, eax
lea edx, [edi + 2]
mov dword [esp + 0x60], ecx
lea ecx, [edi + 1]
mov dword [esp + 0x5c], ecx
sub ecx, eax
mov dword [esp + 0x74], edx
sub edx, eax
mov dword [esp + 0x70], ecx
mov ecx, eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x78], edx
mov edx, 1
mov ebx, ecx
sub edx, ecx
mov dword [esp + 0x68], edi
mov dword [esp + 0x58], edx
lea esi, [esi]
lea ecx, [eax + ebp]
test ebp, ebp
jle 0x40e2b7
cmp dword [esp + 0x20], 2
jbe 0x40e7f0
mov edi, dword [esp + 0x18]
mov edx, eax
mov ecx, esi
or edx, esi
or edx, edi
lea edi, [eax + 1]
and edx, 3
sete dl
sub ecx, edi
cmp ecx, 2
seta cl
test dl, cl
je 0x40e7f0
mov edx, dword [esp + 0x58]
neg edx
cmp edx, 2
jbe 0x40e7f0
mov dword [esp + 0x10], eax
xor ecx, ecx
mov dword [esp + 0x54], ebx
mov dword [esp + 0x30], ebp
mov ebp, dword [esp + 0x24]
lea esi, [esi]
mov eax, dword [esp + 0x10]
lea edi, [eax + ecx]
mov eax, dword [esp + 0x18]
lea ebx, [eax + ecx]
movzx eax, word [edi]
movzx edi, word [edi + 2]
movzx edx, word [ebx]
movzx ebx, word [ebx + 2]
add dl, al
add dh, ah
mov eax, edi
add al, bl
movzx edx, dx
add ah, bh
mov edi, eax
shl edi, 0x10
or edx, edi
mov dword [esi + ecx], edx
add ecx, 4
cmp ecx, ebp
jne 0x40e228
mov eax, dword [esp + 0x10]
mov ebp, dword [esp + 0x30]
mov edi, dword [esp + 0x24]
mov ebx, dword [esp + 0x54]
lea ecx, [eax + ebp]
cmp ebp, edi
je 0x40e2b7
mov edi, dword [esp + 0x60]
movzx edx, byte [esi + edi]
mov edi, dword [esp + 0x68]
add dl, byte [eax + edi]
mov byte [esi + edi], dl
mov edi, dword [esp + 0x5c]
cmp edi, ebp
jge 0x40e2b7
mov edx, dword [esp + 0x70]
movzx edx, byte [esi + edx]
add dl, byte [eax + edi]
mov byte [esi + edi], dl
mov edi, dword [esp + 0x74]
cmp ebp, edi
jle 0x40e2b7
mov edx, dword [esp + 0x78]
movzx edx, byte [esi + edx]
add dl, byte [eax + edi]
mov byte [esi + edi], dl
add dword [esp + 0x18], ebx
mov eax, ecx
mov byte [esi + ebp], 0xff
add esi, ebx
sub dword [esp + 0x1c], 1
jne 0x40e1c8
jmp 0x40d9fa
mov eax, dword [esp + 0x2c]
mov edi, dword [esp + 0x28]
mov edx, dword [esp + 0x10]
mov ecx, eax
lea ebx, [eax + ebp]
mov esi, edi
sub edx, edi
test ebp, ebp
jle case.default.0x40d6e6
movzx eax, byte [edx]
add ecx, 1
add edx, 1
shr al, 1
add al, byte [ecx - 1]
mov byte [edx + esi - 1], al
cmp ecx, ebx
jne 0x40e2f0
jmp case.default.0x40d6e6
test ebp, ebp
jle case.default.0x40d6e6
mov ebx, dword [esp + 0x2c]
mov esi, dword [esp + 0x28]
mov dword [esp + 0x54], ebp
mov ecx, dword [esp + 0x10]
mov edi, ebx
add ebx, ebp
sub eax, esi
mov dword [esp + 0x30], ebx
sub ecx, esi
mov ebp, eax
mov esi, ecx
lea esi, [esi]
nop
mov ebx, dword [esp + 0x28]
movzx eax, byte [edi]
movzx ecx, byte [ebp]
movzx edx, byte [ebp + ebx]
movzx ebx, byte [esi]
mov byte [esp + 0x18], al
mov byte [esp + 0x24], cl
lea eax, [edx + ebx]
mov dword [esp + 0x1c], ebx
sub eax, ecx
mov byte [esp + 0x10], bl
mov ebx, eax
mov byte [esp + 0x20], dl
sub ebx, edx
mov edx, ebx
neg edx
cmovs edx, ebx
mov ebx, eax
sub ebx, ecx
mov ecx, ebx
neg ecx
cmovs ecx, ebx
mov ebx, dword [esp + 0x1c]
sub eax, ebx
mov ebx, eax
neg ebx
cmovns eax, ebx
cmp ecx, edx
mov ebx, edx
cmovle ebx, ecx
cmp eax, ebx
jle 0x40e3a5
movzx eax, byte [esp + 0x24]
movzx ebx, byte [esp + 0x20]
cmp ecx, edx
cmovge eax, ebx
mov byte [esp + 0x10], al
mov ebx, dword [esp + 0x28]
movzx eax, byte [esp + 0x18]
add edi, 1
add ebp, 1
add al, byte [esp + 0x10]
add esi, 1
mov byte [esi + ebx - 1], al
mov eax, dword [esp + 0x30]
cmp edi, eax
jne 0x40e338
mov ebp, dword [esp + 0x54]
jmp case.default.0x40d6e6
mov edi, dword [esp + 0x28]
mov esi, dword [esp + 0x10]
xor ecx, ecx
sub esi, edi
mov edi, dword [esp + 0x10]
test ebp, ebp
jle case.default.0x40d6e6
lea esi, [esi]
movzx ebx, byte [eax + ecx]
movzx edx, byte [esi + ecx]
add edx, ebx
mov ebx, dword [esp + 0x2c]
sar edx, 1
add dl, byte [ebx + ecx]
mov byte [edi + ecx], dl
add ecx, 1
cmp ebp, ecx
jne 0x40e3f0
jmp case.default.0x40d6e6
test ebp, ebp
jle case.default.0x40d6e6
lea edx, [ebp - 1]
cmp edx, 2
jbe 0x40e84f
mov edi, dword [esp + 0x10]
mov esi, dword [esp + 0x2c]
mov edx, edi
lea ebx, [esi + 1]
mov ecx, edi
or edx, esi
or edx, eax
and edx, 3
sete dl
sub ecx, ebx
cmp ecx, 2
seta cl
test dl, cl
je 0x40e84f
lea ecx, [eax + 1]
sub edi, ecx
cmp edi, 2
jbe 0x40e84f
mov dword [esp + 0x18], eax
mov edi, ebp
xor ebx, ebx
mov dword [esp + 0x1c], ebp
and edi, 0xfffffffc
mov ebp, esi
nop
mov eax, dword [esp + 0x18]
lea ecx, [ebp + ebx]
lea esi, [eax + ebx]
movzx eax, word [ecx]
movzx ecx, word [ecx + 2]
movzx edx, word [esi]
movzx esi, word [esi + 2]
add dl, al
add dh, ah
mov eax, esi
add al, cl
movzx edx, dx
add ah, ch
mov esi, eax
mov eax, dword [esp + 0x10]
shl esi, 0x10
or edx, esi
mov dword [eax + ebx], edx
add ebx, 4
cmp ebx, edi
jne 0x40e470
mov ebp, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
cmp ebp, ebx
je case.default.0x40d6e6
mov edi, dword [esp + 0x2c]
mov edx, ebp
mov esi, dword [esp + 0x10]
and edx, 0xfffffffc
movzx ecx, byte [eax + edx]
add cl, byte [edi + edx]
mov byte [esi + edx], cl
lea edx, [ebx + 1]
cmp edx, ebp
jge case.default.0x40d6e6
movzx edx, byte [eax + ebx + 1]
add dl, byte [edi + ebx + 1]
mov byte [esi + ebx + 1], dl
lea edx, [ebx + 2]
cmp edx, ebp
jge case.default.0x40d6e6
movzx edx, byte [edi + ebx + 2]
add dl, byte [eax + ebx + 2]
mov byte [esi + ebx + 2], dl
jmp case.default.0x40d6e6
test ebp, ebp
jle case.default.0x40d6e6
lea eax, [ebp - 1]
cmp eax, 2
jbe 0x40e903
mov edi, dword [esp + 0x10]
mov ebx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x28]
lea edx, [ebx + 1]
mov eax, edi
mov esi, edi
sub eax, edx
sub esi, ecx
cmp eax, 2
lea eax, [ecx - 1]
seta dl
cmp eax, 2
seta al
test dl, al
je 0x40e903
mov eax, ebx
or eax, edi
or eax, esi
test al, 3
jne 0x40e903
mov dword [esp + 0x18], ebp
mov edi, ebp
xor ecx, ecx
and edi, 0xfffffffc
lea esi, [esi]
mov eax, dword [esp + 0x2c]
lea ebp, [esi + ecx]
lea edx, [eax + ecx]
movzx eax, word [ebp]
movzx ebx, word [edx]
movzx edx, word [edx + 2]
add al, bl
add ah, bh
movzx ebx, word [ebp + 2]
movzx eax, ax
add bl, dl
add bh, dh
shl ebx, 0x10
or eax, ebx
mov ebx, dword [esp + 0x10]
mov dword [ebx + ecx], eax
add ecx, 4
cmp edi, ecx
jne 0x40e568
mov ebp, dword [esp + 0x18]
cmp ebp, edi
je case.default.0x40d6e6
mov esi, ebx
mov ebx, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
mov edx, ebp
mov eax, edi
and edx, 0xfffffffc
sub eax, ebx
movzx ecx, byte [ecx + edx]
add cl, byte [esi + eax]
lea eax, [edi + 1]
mov byte [esi + edx], cl
cmp ebp, eax
jle case.default.0x40d6e6
mov ecx, dword [esp + 0x2c]
sub eax, ebx
movzx edx, byte [ecx + edi + 1]
add dl, byte [esi + eax]
lea eax, [edi + 2]
mov byte [esi + edi + 1], dl
cmp eax, ebp
jge case.default.0x40d6e6
sub eax, ebx
movzx edx, byte [ecx + edi + 2]
add dl, byte [esi + eax]
mov byte [esi + edi + 2], dl
jmp case.default.0x40d6e6
test ebp, ebp
jle case.default.0x40d6e6
lea eax, [ebp - 1]
cmp eax, 2
jbe 0x40e938
mov esi, dword [esp + 0x10]
mov ecx, dword [esp + 0x2c]
mov ebx, dword [esp + 0x28]
lea edx, [ecx + 1]
mov eax, esi
mov edi, esi
sub eax, edx
sub edi, ebx
cmp eax, 2
lea eax, [ebx - 1]
seta dl
cmp eax, 2
seta al
test dl, al
je 0x40e938
mov eax, esi
or eax, ecx
or eax, edi
test al, 3
jne 0x40e938
mov dword [esp + 0x18], ebp
mov esi, ebp
xor ecx, ecx
and esi, 0xfffffffc
nop
mov eax, dword [esp + 0x2c]
lea ebp, [edi + ecx]
movzx ebx, word [ebp]
lea edx, [eax + ecx]
movzx eax, word [edx]
movzx edx, word [edx + 2]
add al, bl
add ah, bh
movzx ebx, word [ebp + 2]
movzx eax, ax
add bl, dl
add bh, dh
shl ebx, 0x10
or eax, ebx
mov ebx, dword [esp + 0x10]
mov dword [ebx + ecx], eax
add ecx, 4
cmp ecx, esi
jne 0x40e660
mov ebp, dword [esp + 0x18]
cmp ebp, ecx
je case.default.0x40d6e6
mov esi, dword [esp + 0x28]
mov edi, ebx
mov edx, ebp
mov ebx, dword [esp + 0x2c]
mov eax, ecx
and edx, 0xfffffffc
sub eax, esi
movzx ebx, byte [ebx + edx]
add bl, byte [edi + eax]
lea eax, [ecx + 1]
mov byte [edi + edx], bl
cmp eax, ebp
jge case.default.0x40d6e6
mov ebx, dword [esp + 0x2c]
sub eax, esi
movzx edx, byte [ebx + ecx + 1]
add dl, byte [edi + eax]
lea eax, [ecx + 2]
mov byte [edi + ecx + 1], dl
cmp eax, ebp
jge case.default.0x40d6e6
sub eax, esi
movzx edx, byte [ebx + ecx + 2]
add dl, byte [edi + eax]
mov byte [edi + ecx + 2], dl
jmp case.default.0x40d6e6
mov esi, dword [esp + 0x28]
mov eax, edi
mov ecx, ebp
lea ebx, [edi + esi]
mov esi, edx
lea esi, [esi]
nop
movzx edx, byte [eax]
add eax, 1
add ecx, 1
mov byte [ecx - 1], dl
cmp eax, ebx
jne 0x40e710
mov edx, esi
jmp 0x40d695
mov ebx, dword [esp + 0x18]
mov esi, dword [esp + 0x2c]
mov dword [esp + 0x10], edx
xor eax, eax
mov edx, dword [esp + 0x28]
lea esi, [esi]
movzx ecx, byte [ebx + eax]
add cl, byte [esi + eax + 1]
mov byte [ebp + eax], cl
add eax, 1
cmp eax, edx
jne 0x40e740
mov edx, dword [esp + 0x10]
jmp 0x40d695
mov ebx, dword [esp + 0x18]
xor eax, eax
lea esi, [esi]
lea esi, [esi]
movzx edx, byte [esi + eax]
add dl, byte [ebx + eax]
mov byte [ecx + eax], dl
add eax, 1
cmp eax, edi
jne 0x40e770
jmp 0x40dfef
mov eax, ebx
mov edx, esi
mov edi, ebx
lea esi, [esi]
lea esi, [esi]
movzx ebx, byte [eax]
add eax, 1
add edx, 1
mov byte [edx - 1], bl
cmp eax, ecx
jne 0x40e7a0
mov ebx, edi
jmp 0x40e10c
lea ecx, [eax + ebp]
mov edx, dword [esp + 0x18]
mov dword [esp + 0x10], ecx
lea esi, [esi]
nop
mov edi, dword [esp + 0x10]
movzx ecx, byte [edx]
add eax, 1
add edx, 1
add cl, byte [eax - 1]
mov byte [edx + ebx - 1], cl
cmp eax, edi
jne 0x40e7d0
mov ecx, edi
jmp 0x40d9e3
lea ecx, [eax + ebp]
mov edx, dword [esp + 0x18]
mov dword [esp + 0x10], ecx
lea esi, [esi]
nop
mov edi, dword [esp + 0x10]
movzx ecx, byte [eax]
add eax, 1
add edx, 1
add cl, byte [edx - 1]
mov byte [edx + ebx - 1], cl
cmp eax, edi
jne 0x40e800
mov ecx, edi
jmp 0x40e2b7
mov dword [esp + 0x28], 1
mov ecx, 1
mov eax, edi
mov edx, ebp
add ecx, edi
lea esi, [esi]
movzx ebx, byte [eax]
add eax, 1
add edx, 1
mov byte [edx - 1], bl
cmp eax, ecx
jne 0x40e838
xor edx, edx
jmp 0x40d7c6
mov ebx, dword [esp + 0x10]
mov esi, dword [esp + 0x2c]
xor edx, edx
lea esi, [esi]
movzx ecx, byte [esi + edx]
add cl, byte [eax + edx]
mov byte [ebx + edx], cl
add edx, 1
cmp ebp, edx
jne 0x40e860
jmp case.default.0x40d6e6
cmp dword [esp + 0xac], 0x10
jne 0x40d844
mov edi, dword [esp + 0x38]
mov eax, dword [esp + 0x40]
add eax, dword [edi + 0xc]
jmp 0x40da31
cmp dword [esp + 0xac], 7
jle 0x40e968
cmp dword [esp + 0xac], 0x10
jne 0x40e8f3
mov eax, dword [esp + 0x38]
mov ecx, dword [eax + 0xc]
mov eax, dword [esp + 0xa4]
imul eax, dword [esp + 0xa8]
imul eax, dword [esp + 0xa0]
test eax, eax
je 0x40e8f3
xor edx, edx
test al, 1
je 0x40e8e1
mov edx, 1
rol word [ecx], 8
cmp edx, eax
je 0x40e8f3
rol word [ecx + edx*2], 8
rol word [ecx + edx*2 + 2], 8
add edx, 2
cmp edx, eax
jne 0x40e8e1
add esp, 0x8c
mov eax, 1
pop ebx
pop esi
pop edi
pop ebp
ret
mov edi, dword [esp + 0x2c]
mov eax, dword [esp + 0x10]
mov esi, dword [esp + 0x28]
mov edx, edi
lea ebx, [edi + ebp]
sub eax, esi
lea esi, [esi]
lea esi, [esi]
movzx ecx, byte [edx]
add edx, 1
add cl, byte [eax]
add eax, 1
mov byte [eax + esi - 1], cl
cmp edx, ebx
jne 0x40e920
jmp case.default.0x40d6e6
mov edi, dword [esp + 0x2c]
mov eax, dword [esp + 0x10]
mov esi, dword [esp + 0x28]
mov edx, edi
lea ebx, [edi + ebp]
sub eax, esi
lea esi, [esi]
nop
movzx ecx, byte [edx]
add edx, 1
add cl, byte [eax]
add eax, 1
mov byte [eax + esi - 1], cl
cmp edx, ebx
jne 0x40e950
jmp case.default.0x40d6e6
mov eax, dword [esp + 0xa4]
mov esi, dword [esp + 0x4c]
mov dword [esp + 0x10], 0
xor ebp, ebp
lea edi, [eax - 1]
mov eax, dword [esp + 0x64]
mov dword [esp + 0x18], edi
sub eax, esi
mov esi, dword [esp + 0x6c]
mov dword [esp + 0x14], eax
lea edx, [esi - 4]
mov eax, edx
shr eax, 2
lea ebx, [eax + 1]
neg eax
lea eax, [edx + eax*4]
lea edx, [esi - 2]
mov dword [esp + 0x24], ebx
shl ebx, 2
mov dword [esp + 0x40], eax
mov eax, edx
shr eax, 1
mov dword [esp + 0x28], ebx
lea esi, [eax + 1]
neg eax
lea eax, [edx + eax*2]
mov dword [esp + 0x2c], esi
add esi, esi
mov dword [esp + 0x30], eax
lea eax, [edi*4]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0xa4]
mov dword [esp + 0x48], esi
lea eax, [eax + eax*2]
mov dword [esp + 0x20], eax
lea esi, [esi]
nop
mov eax, dword [esp + 0x38]
mov ecx, 1
mov esi, dword [eax + 0xc]
mov eax, dword [esp + 0x14]
add eax, ebp
lea edx, [esi + ebp]
add esi, eax
mov eax, dword [esp + 0xb0]
test eax, eax
jne 0x40ea20
mov eax, dword [esp + 0xac]
movzx ecx, byte [eax + 0x4ec9e4]
cmp dword [esp + 0xac], 4
je 0x40eb03
cmp dword [esp + 0xac], 2
je 0x40eb66
cmp dword [esp + 0xac], 1
je 0x40ec15
mov eax, dword [esp + 0x3c]
cmp dword [esp + 0xa0], eax
je 0x40eaa2
mov eax, dword [esp + 0x38]
mov ecx, dword [eax + 0xc]
add ecx, ebp
cmp dword [esp + 0x3c], 1
je 0x40eae0
cmp dword [esp + 0x18], 0xffffffff
je 0x40eaa2
mov eax, dword [esp + 0x1c]
lea edx, [ecx + eax]
mov eax, dword [esp + 0x20]
add eax, ecx
lea esi, [esi]
nop
mov byte [edx + 3], 0xff
movzx ebx, byte [eax - 1]
sub eax, 3
sub edx, 4
mov byte [edx + 6], bl
movzx ebx, byte [eax + 1]
mov byte [edx + 5], bl
movzx ebx, byte [eax]
mov byte [edx + 4], bl
cmp eax, ecx
jne 0x40ea80
mov edi, dword [esp + 0x10]
mov esi, dword [esp + 0x44]
lea eax, [edi + 1]
add ebp, esi
cmp dword [esp + 0x34], edi
je 0x40e8f3
mov dword [esp + 0x10], eax
jmp 0x40e9f0
imul esi, dword [esp + 0xac]
cmp esi, 0x7ffffff8
jg 0x40d4d0
jmp 0x40d510
mov eax, dword [esp + 0x18]
cmp eax, 0xffffffff
je 0x40eaa2
lea esi, [esi]
mov byte [ecx + eax*2 + 1], 0xff
movzx edx, byte [ecx + eax]
mov byte [ecx + eax*2], dl
sub eax, 1
jae 0x40eaf0
jmp 0x40eaa2
cmp dword [esp + 0x6c], 1
jle 0x40ed98
mov eax, dword [esp + 0x48]
mov ebx, esi
lea edi, [edx + eax]
lea esi, [esi]
nop
movzx eax, byte [ebx]
add edx, 2
add ebx, 1
shr al, 4
imul eax, ecx
mov byte [edx - 2], al
movzx eax, byte [ebx - 1]
and eax, 0xf
imul eax, ecx
mov byte [edx - 1], al
cmp edx, edi
jne 0x40eb20
mov eax, dword [esp + 0x2c]
add esi, eax
mov eax, dword [esp + 0x30]
cmp eax, 1
jne 0x40ea4a
movzx eax, byte [esi]
shr al, 4
imul eax, ecx
mov byte [edi], al
jmp 0x40ea4a
cmp dword [esp + 0x6c], 3
jle 0x40ed8d
mov eax, dword [esp + 0x28]
mov ebx, esi
lea edi, [edx + eax]
lea esi, [esi]
movzx eax, byte [ebx]
add edx, 4
add ebx, 1
shr al, 6
imul eax, ecx
mov byte [edx - 4], al
movzx eax, byte [ebx - 1]
shr al, 4
and eax, 3
imul eax, ecx
mov byte [edx - 3], al
movzx eax, byte [ebx - 1]
shr al, 2
and eax, 3
imul eax, ecx
mov byte [edx - 2], al
movzx eax, byte [ebx - 1]
and eax, 3
imul eax, ecx
mov byte [edx - 1], al
cmp edi, edx
jne 0x40eb80
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x40]
add esi, eax
test edx, edx
jle 0x40ea4a
movzx eax, byte [esi]
shr al, 6
imul eax, ecx
mov byte [edi], al
cmp edx, 1
je 0x40ea4a
movzx eax, byte [esi]
shr al, 4
and eax, 3
imul eax, ecx
mov byte [edi + 1], al
cmp edx, 3
jne 0x40ea4a
movzx eax, byte [esi]
shr al, 2
and eax, 3
imul eax, ecx
mov byte [edi + 2], al
jmp 0x40ea4a
mov eax, dword [esp + 0x6c]
cmp eax, 7
jle 0x40eda3
lea ebx, [eax - 8]
mov dword [esp + 0x54], ebp
mov ebp, ecx
mov eax, ebx
shr eax, 3
mov dword [esp + 0x50], eax
add eax, 1
mov dword [esp + 0x4c], eax
lea edi, [edx + eax*8]
mov eax, esi
movzx ecx, byte [eax]
add edx, 8
add eax, 1
sar cl, 7
and ecx, ebp
mov byte [edx - 8], cl
movzx ecx, byte [eax - 1]
shr cl, 6
and ecx, 1
neg ecx
and ecx, ebp
mov byte [edx - 7], cl
movzx ecx, byte [eax - 1]
shr cl, 5
and ecx, 1
neg ecx
and ecx, ebp
mov byte [edx - 6], cl
movzx ecx, byte [eax - 1]
shr cl, 4
and ecx, 1
neg ecx
and ecx, ebp
mov byte [edx - 5], cl
movzx ecx, byte [eax - 1]
shr cl, 3
and ecx, 1
neg ecx
and ecx, ebp
mov byte [edx - 4], cl
movzx ecx, byte [eax - 1]
shr cl, 2
and ecx, 1
neg ecx
and ecx, ebp
mov byte [edx - 3], cl
movzx ecx, byte [eax - 1]
shr cl, 1
and ecx, 1
neg ecx
and ecx, ebp
mov byte [edx - 2], cl
movzx ecx, byte [eax - 1]
and ecx, 1
neg ecx
and ecx, ebp
mov byte [edx - 1], cl
cmp edx, edi
jne 0x40ec40
mov eax, dword [esp + 0x50]
mov ecx, ebp
mov ebp, dword [esp + 0x54]
neg eax
lea edx, [ebx + eax*8]
mov eax, dword [esp + 0x4c]
add esi, eax
test edx, edx
jle 0x40ea4a
movzx eax, byte [esi]
sar al, 7
and eax, ecx
mov byte [edi], al
cmp edx, 1
je 0x40ea4a
movzx eax, byte [esi]
shr al, 6
and eax, 1
neg eax
and eax, ecx
mov byte [edi + 1], al
cmp edx, 2
je 0x40ea4a
movzx eax, byte [esi]
shr al, 5
and eax, 1
neg eax
and eax, ecx
mov byte [edi + 2], al
cmp edx, 3
je 0x40ea4a
movzx eax, byte [esi]
shr al, 4
and eax, 1
neg eax
and eax, ecx
mov byte [edi + 3], al
cmp edx, 4
je 0x40ea4a
movzx eax, byte [esi]
shr al, 3
and eax, 1
neg eax
and eax, ecx
mov byte [edi + 4], al
cmp edx, 5
je 0x40ea4a
movzx eax, byte [esi]
shr al, 2
and eax, 1
neg eax
and eax, ecx
mov byte [edi + 5], al
cmp edx, 7
jne 0x40ea4a
movzx eax, byte [esi]
shr al, 1
and eax, 1
neg eax
and eax, ecx
mov byte [edi + 6], al
jmp 0x40ea4a
mov edi, edx
mov edx, dword [esp + 0x6c]
jmp 0x40ebcd
mov eax, dword [esp + 0x6c]
mov edi, edx
jmp 0x40eb4d
mov edi, edx
mov edx, dword [esp + 0x6c]
jmp 0x40ece1