Function at 0x41ea00
Capabilities:
Encrypt data using speck

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
push ebx
mov ebx, edx
mov dword [ebp - 0x40], 0
xor eax, eax
mov dword [ebp - 0x24], ebx
mov dword [ebp - 8], 0xffffffff
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x10], 0xffffffff
mov byte [0x54d166], al
push esi
mov esi, ecx
mov dword [ebp - 0x18], esi
test ebx, ebx
jne 0x41ea49
mov eax, 0xfe3f
and word [0x6e84ec], ax
xor eax, eax
mov word [0x6e84c6], ax
test esi, esi
je 0x41f7bb
movzx eax, word [esi]
mov edx, eax
and al, 0x1f
mov dword [ebp - 0x30], edx
push edi
cmp al, 5
jne 0x41ebe6
test ebx, ebx
mov ebx, dword [0x6e85a4]
mov dword [ebp - 0x1c], ebx
jne 0x41eb55
mov eax, dword [ebx + 0x44]
cmp eax, dword [ebx]
mov ax, word [0x6e84c4]
je 0x41ea8b
test ax, ax
je 0x41eb55
cmp word [ebx + 0x22], 0
jl 0x41eb55
cmp ax, 3
je 0x41eb55
movzx eax, word [ebx + 0x18]
mov edx, 0x7d00
mov esi, dword [ebx + 0x48]
mov ecx, dword [ebx + 0x40]
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x3c]
push eax
push esi
call fcn.0041e0e0
mov edx, dword [ebx + 0x40]
mov ecx, eax
push esi
push 0x7d00
call fcn.0041e450
add esp, 0x10
cmp dword [ebx], eax
jne 0x41eb49
mov ax, word [0x6e68e4]
cmp ax, 1
jne 0x41eb6e
mov ax, word [0x6e8e72]
mov edx, dword [0x6e85a4]
add ax, 0x19
movsx ecx, ax
shl ecx, 5
mov word [edx + 0x14], ax
mov eax, dword [0x6e0d84]
movzx eax, word [ecx + eax + 0x10]
mov ecx, edx
mov word [edx + 0x16], ax
mov eax, 0xfff7
and word [edx + 0x82], ax
xor eax, eax
mov dword [edx + 0xe], 0xc000c
mov dword [edx + 0x20], eax
mov word [edx + 0x1e], ax
call fcn.0041dc20
or word [0x6e84ec], 4
or eax, 0xffffffff
mov dword [0x6e84ba], 1
mov word [0x6e84cc], ax
mov ebx, dword [0x6e85a4]
mov esi, dword [ebp - 0x18]
mov dword [ebp - 0x1c], ebx
cmp word [esi], 0
jl case.0x41ee32.5
movzx edx, word [esi + 2]
add esi, 2
mov dword [ebp - 0x30], edx
jmp 0x41ebef
or word [ebx + 0x82], 0x10
or edi, 0xffffffff
mov word [ebx + 0x22], di
cmp ax, 2
jne 0x41eb90
mov eax, 1
mov word [0x6e84ea], ax
jmp 0x41eb49
test byte [0x6e84ec], 0x10
jne 0x41eb49
mov ebx, dword [0x6e85a4]
mov dword [ebp - 0x1c], ebx
mov cx, word [ebx + 0x18]
call fcn.0043e810
mov esi, dword [ebp - 0x18]
movzx eax, ax
cmp ax, 0xffff
je 0x41eb55
cwde
mov edx, 1
lea ecx, [eax + eax*4]
mov eax, dword [0x6e5d50]
mov word [eax + ecx*8 + 0x1e], dx
mov edx, 0x149
mov word [eax + ecx*8 + 0x14], dx
mov word [eax + ecx*8 + 0x20], di
or word [0x6e84ec], 0x10
jmp 0x41eb55
mov ebx, dword [0x6e85a4]
mov dword [ebp - 0x1c], ebx
mov al, dl
movzx ecx, dx
and al, 0x1f
cmp al, 6
jne 0x41ec3b
cmp dword [ebp - 0x24], 0
jne 0x41ec2a
mov eax, 0x2000
mov edi, 1
add ax, word [ebx + 0x4e]
mov edx, edi
movzx ecx, ax
mov eax, dword [ebp - 0x30]
shr ecx, 0xe
add ecx, 8
cwde
shl edx, cl
test eax, edx
je 0x41ec2a
mov word [0x6e84c6], di
cmp word [esi], 0
jl case.0x41ee32.5
movzx ecx, word [esi + 2]
add esi, 2
mov edx, dword [ebp - 0x24]
movzx eax, cx
and cl, 0x1f
cmp cl, 0x13
jne 0x41ec66
test edx, edx
jne 0x41ec55
or word [0x6e84ec], 0x40
cmp word [esi], 0
jl case.0x41ee32.5
movzx eax, word [esi + 2]
add esi, 2
movzx ecx, ax
and al, 0x1f
cmp al, 0x14
jne 0x41ec90
test edx, edx
jne 0x41ec7f
mov eax, 0x80
or word [0x6e84ec], ax
cmp word [esi], 0
jl case.0x41ee32.5
movzx ecx, word [esi + 2]
add esi, 2
movzx eax, cx
mov edi, 0x100
and cl, 0x1f
cmp cl, 0x15
jne 0x41ecbc
test edx, edx
jne 0x41ecab
or word [0x6e84ec], di
cmp word [esi], 0
jl case.0x41ee32.5
movzx eax, word [esi + 2]
add esi, 2
movzx ecx, ax
lea edx, [esi + 2]
mov dword [ebp - 0x3c], ecx
movzx ecx, ax
mov dword [ebp - 0x44], ecx
movzx ecx, word [esi + 2]
add esi, 4
sar eax, 8
and eax, 0x3f
mov dword [ebp - 0x20], ecx
cmp dword [0x6e0cf0], 5
mov byte [ebp - 1], cl
mov ecx, dword [0x6e0d88]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x14], ecx
je 0x41ee16
mov bx, word [0x6e0d24]
mov edx, esi
mov esi, dword [0x6e0d2c]
mov dword [ebp - 0xc], 2
mov dword [ebp - 0x38], ebx
movzx edi, word [edx]
add edx, 2
mov eax, edi
mov ecx, edi
and eax, 0x3c00
and ecx, 0x3ff
cmp eax, 0x400
jne 0x41ed80
add edx, 2
cmp cx, word [0x6e0d22]
jne 0x41ed79
mov word [0x6e0d20], cx
test bx, bx
js 0x41ed6d
mov eax, dword [0x6e0cf0]
cmp eax, 2
je 0x41ed6d
cmp eax, 3
je 0x41ed6d
mov eax, 1
mov dword [0x6e0cf0], 1
mov dword [ebp - 0xc], eax
jmp 0x41edb4
or eax, 0xffffffff
mov ebx, eax
mov word [0x6e0d24], bx
xor eax, eax
mov dword [ebp - 0xc], eax
jmp 0x41edb4
mov eax, edi
and eax, 0x3c00
cmp eax, 0x1800
jne 0x41edb1
mov eax, dword [0x6e0cf0]
cmp eax, 2
je 0x41edb1
cmp eax, 3
mov eax, dword [ebp - 0xc]
je 0x41edb4
imul esi, ecx, 0x84
add esi, dword [ebp - 0x14]
mov dword [0x6e0d2c], esi
jmp 0x41edb4
mov eax, dword [ebp - 0xc]
test di, di
jns 0x41ed16
mov dword [ebp - 0x38], ebx
test esi, esi
mov ebx, dword [ebp - 0x1c]
mov dword [ebp - 0x34], esi
mov esi, dword [ebp - 0x18]
je 0x41edf6
test ax, ax
je 0x41edec
cmp ax, 2
jne 0x41edf6
mov eax, dword [ebp - 0x34]
test byte [eax + 0x82], 0x40
je 0x41edf6
cmp eax, dword [0x6e0d30]
je 0x41edf6
mov dword [0x6e0d2c], 0
cmp word [0x6e0d20], 0xffff
mov edx, dword [ebp - 0x30]
jne 0x41ee13
cmp word [ebp - 0x38], 0
jle 0x41ee13
or eax, 0xffffffff
mov word [0x6e0d24], ax
mov eax, dword [ebp - 0x28]
cmp dword [ebp - 0x24], 0
je 0x41ee25
cmp ax, 5
jmp 0x41efe7
movzx eax, ax
dec eax
cmp eax, 7
ja case.default.0x41ee32
jmp dword [eax*4 + 0x41f7c4]
mov eax, dword [ebx + 0x44]
mov byte [0x54d1f7], 1
cmp eax, dword [ebx]
jne case.0x41ee32.5
cmp word [ebx + 0x34], 0
jne case.0x41ee32.5
cmp dword [0x6e0d80], 0
jne case.default.0x41ee32
cmp word [ebx + 0x36], 1
je case.0x41ee32.5
mov eax, 1
mov word [ebx + 0x36], ax
jmp case.default.0x41ee32
mov ebx, dword [ebp - 0x14]
mov eax, 0x3ff
and ax, word [esi]
lea esi, [edx + 4]
test dword [ebp - 0x20], 0x100
movzx ecx, ax
movzx edi, ax
movzx eax, ax
mov dword [ebp - 0x40], eax
je 0x41eeb1
mov eax, ecx
mov ecx, 1
imul eax, eax, 0x84
mov word [eax + ebx + 0x34], cx
mov al, byte [ebp - 1]
imul edi, edi, 0x84
add edi, ebx
cbw
movzx edx, ax
movzx ecx, word [edi + 0x82]
mov al, cl
and al, 6
cmp al, 4
jne 0x41ef4b
cmp word [edi + 0xe], 0
jne 0x41ef15
test dx, dx
jle 0x41ef15
and ecx, 0xfffb
mov word [edi + 0x26], dx
or ecx, 2
mov word [edi + 0x82], cx
cmp dx, 1
je 0x41ef5a
mov eax, edx
shl eax, 4
sub eax, edx
add eax, eax
mov word [edi + 0x26], ax
xor eax, eax
cmp word [edi + 0xe], 1
sete al
mov dword [ebp - 0x40], eax
jmp 0x41eff0
mov ecx, dword [ebp - 0x40]
call fcn.0043e5d0
mov eax, 0xfff9
and word [edi + 0x82], ax
cmp word [edi + 0x34], 0
je 0x41ef5a
mov eax, 0x100
or word [edi + 0x28], ax
xor eax, eax
cmp word [edi + 0xe], 1
sete al
mov dword [ebp - 0x40], eax
jmp 0x41eff0
mov eax, 0x100
test word [edi + 0x28], ax
je case.0x41ee32.5
xor eax, eax
cmp word [edi + 0xe], 1
sete al
mov dword [ebp - 0x40], eax
jmp 0x41eff0
movzx eax, word [esi]
lea esi, [edx + 4]
mov ebx, dword [ebp - 0x14]
and eax, 0x3ff
imul edx, eax, 0x84
movzx ecx, word [edx + ebx + 0x82]
mov al, cl
and al, 6
cmp al, 2
jne case.0x41ee32.5
cmp word [0x6e84ba], 1
je case.0x41ee32.5
jmp 0x41efcc
movzx eax, word [esi]
lea esi, [edx + 4]
mov ebx, dword [ebp - 0x14]
and eax, 0x3ff
imul edx, eax, 0x84
movzx ecx, word [edx + ebx + 0x82]
mov al, cl
and al, 6
cmp al, 6
jne case.0x41ee32.5
and ecx, 0xfffd
or ecx, 4
mov word [edx + ebx + 0x82], cx
jmp 0x41eff0
cmp word [0x6e84ba], 4
jne case.0x41ee32.5
mov ebx, dword [ebp - 0x14]
mov dword [ebp - 0xc], 0
movzx eax, word [esi]
add esi, 2
mov ecx, eax
mov dword [ebp - 0x28], eax
and ecx, 0x3ff
mov dword [ebp - 0x18], esi
mov eax, ecx
mov edi, ecx
mov dword [ebp - 0x38], eax
mov edx, ecx
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x28]
sar eax, 0xa
and eax, 0xf
cmp eax, 0xb
ja case.default.0x41f029
jmp dword [eax*4 + 0x41f7e4]
mov edi, dword [ebp - 0x3c]
mov eax, edi
imul esi, ecx, 0x84
and eax, 0x3f00
add esi, ebx
cmp eax, 0x600
je 0x41f057
mov eax, edi
and eax, 0x3f00
cmp eax, 0x900
jne 0x41f061
test byte [esi + 0x28], 0x80
jne case.default.0x41f029
mov eax, edi
and eax, 0x3f00
cmp eax, 0x200
jne 0x41f075
test byte [esi + 0x28], 0x40
jmp 0x41f0a2
mov eax, edi
and eax, 0x3f00
cmp eax, 0x600
je 0x41f156
mov eax, edi
and eax, 0x3f00
cmp eax, 0x900
je 0x41f156
mov eax, 0x100
test word [esi + 0x28], ax
jne case.default.0x41f029
movzx ecx, word [esi + 0xc]
mov edx, ecx
cmp cx, 0x5b
je 0x41f0ba
cmp cx, 0x5c
jne 0x41f0c7
test byte [esi + 0x82], 1
jne case.default.0x41f029
mov eax, 0x153
cmp cx, ax
je 0x41f134
mov eax, 0x152
cmp cx, ax
je 0x41f134
lea eax, [edx - 0x42]
cmp ax, 2
ja 0x41f109
mov al, byte [ebp - 1]
mov ecx, 1
and al, 7
movzx eax, al
cmove eax, ecx
movzx eax, al
mov word [esi + 0x22], ax
xor eax, eax
mov byte [ebp - 1], 0
mov word [esi + 0x26], ax
xor ecx, ecx
jmp 0x41f165
cmp cx, 0x74
je 0x41f11f
cmp cx, 0x56
je 0x41f11f
mov eax, 0x11a
cmp cx, ax
jne 0x41f156
mov al, byte [ebp - 1]
mov ecx, 0x11a
cbw
mov word [esi + 0x34], ax
cmp dx, cx
jne 0x41f0fb
jmp 0x41f0f7
mov al, byte [ebp - 1]
and al, 7
movzx eax, al
movsx ecx, ax
mov word [esi + 0x22], ax
call fcn.0042e4e0
xor eax, eax
mov byte [ebp - 1], 0
mov word [esi + 0x26], ax
xor ecx, ecx
jmp 0x41f165
cmp byte [ebp - 1], 1
movsx cx, byte [ebp - 1]
mov word [esi + 0x26], cx
je 0x41f172
mov eax, ecx
shl eax, 4
sub eax, ecx
add eax, eax
mov word [esi + 0x26], ax
mov eax, edi
and eax, 0x3f00
cmp eax, 0x200
jne 0x41f1a9
mov edx, dword [ebp - 0x20]
mov eax, edx
and eax, 0x3e00
xor ax, word [esi + 0x28]
movzx ecx, ax
mov word [esi + 0x28], ax
test edx, 0x100
je 0x41f23b
or ecx, 0x40
jmp 0x41f237
mov eax, edi
and eax, 0x3f00
cmp eax, 0x600
je 0x41f1d7
mov eax, edi
and eax, 0x3f00
cmp eax, 0x900
je 0x41f1d7
mov edx, dword [ebp - 0x20]
mov eax, edx
and eax, 0x3e00
je 0x41f23b
or word [esi + 0x28], ax
jmp 0x41f23b
movzx eax, word [esi + 0xc]
mov ecx, 0x153
cmp ax, cx
je 0x41f1ef
mov ecx, 0x152
cmp ax, cx
jne 0x41f204
movsx ecx, word [esi + 0x22]
lea eax, [ecx*8]
sub eax, ecx
mov byte [eax*2 + 0x6e5d83], 0
mov eax, 0x16d
cmp word [esi + 0xc], ax
jne 0x41f216
mov dword [esi + 0x34], 0x640000
mov edx, dword [ebp - 0x20]
mov eax, 0xffff81ff
and ax, word [esi + 0x28]
movzx ecx, ax
mov word [esi + 0x28], ax
test edx, 0x100
je 0x41f23b
or ecx, 0x80
mov word [esi + 0x28], cx
movzx ecx, word [esi + 0x28]
mov eax, ecx
and eax, 0x3e00
cmp eax, 0x3e00
jne case.default.0x41f029
test edx, 0x100
je 0x41f263
or ecx, 0x100
mov word [esi + 0x28], cx
movzx ecx, word [esi + 0x82]
test cl, 1
jne case.default.0x41f029
movzx eax, word [esi + 0xc]
mov edx, eax
cwde
imul edi, eax, 0x32
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x38], edi
test byte [edi + 0x6e8c58], 2
je 0x41f39c
mov eax, ecx
and eax, 6
jne 0x41f312
and ecx, 0xfffb
mov dword [esi + 4], eax
movzx edx, cx
movzx eax, cx
or ecx, 2
movzx edi, cx
mov dword [ebp - 0x34], edi
mov edi, dword [ebp - 0x38]
mov word [esi + 0x82], cx
cmp dword [edi + 0x6e8c38], 0
je 0x41f2e7
test byte [ebp - 0x34], 1
jne 0x41f2f3
mov ax, word [0x6e84b4]
or edx, 3
mov word [esi + 0x1c], ax
mov eax, dword [ebp - 0x1c]
mov word [esi + 0x82], dx
mov word [0x6e84b4], ax
jmp 0x41f2f6
and eax, 0xfff9
mov word [esi + 0x82], ax
mov eax, dword [ebp - 0x1c]
cmp word [ebp - 0x30], 0x1e
je case.default.0x41f029
mov edx, 1
mov ecx, eax
call fcn.00459410
jmp case.default.0x41f029
cmp eax, 6
jne case.default.0x41f029
mov edi, dword [ebp - 0x1c]
xor edx, edx
mov ecx, edi
mov dword [esi + 4], 0
call fcn.00459410
movzx ecx, word [esi + 0x82]
test eax, eax
je 0x41f344
and ecx, 0xfffb
or ecx, 2
jmp 0x41f34a
or ecx, 6
movzx ecx, cx
mov word [esi + 0x82], cx
movsx eax, word [esi + 0xc]
imul eax, eax, 0x32
cmp dword [eax + 0x6e8c38], 0
je 0x41f38a
test cl, 1
jne case.default.0x41f029
mov ax, word [0x6e84b4]
or ecx, 1
mov word [esi + 0x82], cx
mov word [esi + 0x1c], ax
mov word [0x6e84b4], di
jmp case.default.0x41f029
and ecx, 0xfff9
mov word [esi + 0x82], cx
jmp case.default.0x41f029
mov dword [esi + 4], 0
cmp dword [edi + 0x6e8c38], 0
je 0x41f3c8
mov ax, word [0x6e84b4]
or ecx, 1
mov edi, dword [ebp - 0x1c]
mov word [esi + 0x1c], ax
mov word [0x6e84b4], di
movzx ecx, cx
jmp 0x41f3ce
and ecx, 0xfff9
mov eax, dword [ebp - 0x24]
and ecx, 0xfffb
or ecx, 2
mov byte [0x54d166], al
mov word [esi + 0x82], cx
jmp case.default.0x41f029
movzx eax, word [esi]
mov ecx, edx
add esi, 2
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x18], esi
add ecx, ecx
movzx esi, al
mov edi, 0x100
mov eax, dword [0x6e0d34]
test word [eax + ecx*8 + 0xe], di
jne case.default.0x41f029
mov eax, dword [0x6e0cf0]
mov ecx, dword [ebp - 0x1c]
mov word [0x6e0d20], cx
cmp eax, 2
je case.default.0x41f029
cmp eax, 3
je case.default.0x41f029
mov edx, dword [ebp - 0x3c]
mov eax, edx
and eax, 0x3f00
cmp eax, 0x700
je case.default.0x41f029
mov eax, edx
and eax, 0x3f00
cmp eax, 0x200
jne 0x41f467
cmp byte [ebp - 1], 0
je 0x41f467
cmp dword [ebp - 0x40], 0
jne case.default.0x41f029
cmp cx, word [0x6e0d22]
jne 0x41f482
mov eax, edx
and eax, 0x3f00
cmp eax, 0x200
jne case.default.0x41f029
mov edx, dword [ebp - 0x28]
mov eax, esi
shl eax, 4
sub eax, esi
add eax, eax
mov word [0x6e0d24], ax
test edi, edx
je 0x41f4aa
mov eax, dword [ebp - 0x38]
movzx ecx, ax
mov eax, dword [0x6e0d34]
add ecx, ecx
or word [eax + ecx*8 + 0xe], di
mov eax, edx
sar eax, 6
and eax, 0xf8
inc eax
mov word [0x6e0d26], ax
xor eax, eax
cmp dword [ebp - 0x24], eax
setne al
lea eax, [eax*4 + 1]
mov dword [0x6e0cf0], eax
jmp case.default.0x41f029
mov eax, dword [ebp - 0x1c]
inc eax
mov word [0x6e84d4], ax
jmp case.default.0x41f029
mov edx, ecx
mov dword [ebp - 0x2c], 1
mov ecx, dword [edx*4 + 0x6e0e3c]
test ecx, 0x100
jne case.default.0x41f029
mov eax, dword [ebp - 0x44]
mov esi, dword [ebp - 0x20]
and eax, 0x3f00
cmp eax, 0x200
jne 0x41f51c
mov eax, esi
and eax, 0x3e00
xor eax, ecx
jmp 0x41f52d
test esi, 0x3e00
je 0x41f536
mov eax, esi
and eax, 0x3e00
or eax, ecx
mov dword [edx*4 + 0x6e0e3c], eax
mov ecx, eax
mov eax, ecx
and eax, 0x3e00
cmp eax, 0x3e00
jne 0x41f5b7
test esi, 0x100
je 0x41f579
or ecx, 0x100
mov dword [edx*4 + 0x6e0e3c], ecx
jmp 0x41f579
mov eax, dword [ecx*4 + 0x6e0e3c]
and eax, 0x3e00
mov dword [ebp - 0x2c], 1
cmp eax, 0x3e00
jne case.default.0x41f029
cmp dword [0x6e0da4], 0
mov ecx, dword [ebp - 0xc]
mov edi, dword [ebp - 0x10]
jne 0x41f765
mov edx, 1
mov dword [ebp - 8], edx
jmp 0x41f768
mov eax, dword [ecx*4 + 0x6e0e3c]
and eax, 0x3e00
mov dword [ebp - 0x2c], 1
cmp eax, 0x3e00
jne case.default.0x41f029
cmp dword [0x6e0da4], 0
mov ecx, dword [ebp - 0xc]
mov edi, dword [ebp - 0x10]
je 0x41f765
mov edx, 1
mov dword [ebp - 8], edx
jmp 0x41f768
imul ecx, ecx, 0x84
add ecx, ebx
mov dword [ebp - 0xc], ecx
jmp 0x41f762
mov dword [0x6e0dac], 1
jmp case.default.0x41f029
lea eax, [edx - 2]
cmp ax, 0x7d
ja case.default.0x41f029
cmp cx, 0x1a
jb 0x41f60f
cmp cx, 0x24
jbe 0x41f621
cmp cx, 0x49
jb 0x41f61b
cmp cx, 0x4e
jbe 0x41f621
cmp cx, 0x75
jne 0x41f669
movzx eax, byte [0x54d16b]
mov esi, ecx
cmp eax, esi
je case.default.0x41f029
cmp byte [0x54d16a], 0
mov eax, dword [ebp - 0x1c]
mov byte [0x54d16b], al
je 0x41f64d
mov edx, 1
call fcn.004890e0
push esi
push str.Got_new_atmosphere__d_n
call fcn.00421190
mov ebx, dword [0x6e0d88]
add esp, 8
mov dword [ebp - 0x14], ebx
jmp case.default.0x41f029
cmp cx, 2
jne 0x41f67c
cmp dword [0x6e0d80], 0
jne 0x41f67c
mov ecx, edi
jmp 0x41f6a0
mov edx, dword [ebp - 0x20]
mov bl, byte [ecx + 0x6e0db8]
sar edx, 8
and edx, 0x3f
movsx eax, bl
and eax, edx
cmp eax, edx
je 0x41f75c
or bl, dl
mov byte [ecx + 0x6e0db8], bl
xor edx, edx
call fcn.004890e0
mov ebx, dword [0x6e0d88]
mov byte [0x54d16a], 0
mov dword [ebp - 0x14], ebx
jmp case.default.0x41f029
mov edi, ecx
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 0x10], edi
jmp 0x41f765
mov eax, 1
mov esi, ecx
shl eax, cl
test byte [0x6ef6f9], al
jne case.default.0x41f029
xor edx, edx
lea ecx, [edx + 0x7a]
call fcn.004890e0
movzx eax, byte [0x6ef6f9]
mov ebx, dword [0x6e0d88]
bts eax, esi
mov byte [0x6ef6f9], al
mov dword [ebp - 0x14], ebx
jmp case.default.0x41f029
mov ax, word [0x6e706c]
cmp ax, 0xffff
je case.default.0x41f029
movzx ecx, ax
cmp cx, 0xffff
je 0x41f751
nop word [eax + eax]
movsx eax, cx
imul esi, eax, 0x84
call fcn.0043e290
movzx ecx, word [esi + ebx + 0x1c]
or eax, 0xffffffff
mov word [esi + ebx + 0x1c], ax
mov ebx, dword [0x6e0d88]
cmp cx, ax
jne 0x41f720
mov dword [ebp - 0x14], ebx
mov word [0x6e706c], ax
jmp case.default.0x41f029
or eax, 0xffffffff
mov word [0x6e706c], ax
jmp case.default.0x41f029
mov ebx, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
mov edi, dword [ebp - 0x10]
mov edx, dword [ebp - 8]
cmp word [ebp - 0x28], 0
mov esi, dword [ebp - 0x18]
jge 0x41eff7
test ecx, ecx
je 0x41f78f
mov eax, dword [0x6e0cf0]
cmp eax, 1
je 0x41f789
cmp eax, 5
jne 0x41f78f
mov dword [0x6e0d2c], ecx
cmp edx, 0xffffffff
je 0x41f79c
call fcn.004209e0
mov edx, dword [ebp - 8]
cmp edi, 0xffffffff
je case.0x41ee32.5
test edx, edx
jne 0x41f7aa
cmp dword [ebp - 0x2c], edx
jne case.0x41ee32.5
mov dword [0x51546c], edi
mov dword [0x6e0e38], 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret