Function at 0x407190
Capabilities:
Encrypt data using speck

Disassembly:
sub esp, 0x114
push ebx
push ebp
push esi
push edi
mov di, word [esp + 0x134]
mov esi, ecx
mov dword [esp + 0x2c], edx
mov eax, 0x7fff
mov edx, dword [esp + 0x13c]
mov dword [esp + 0x1c], esi
movzx ebp, di
mov dword [esp + 0x48], eax
cmp edx, 0xffc3d44f
je 0x4071dc
cmp edx, 0xffc3d44e
je 0x4071dc
mov byte [esp + 0x22], 0
cmp edx, 0xffc3d44d
jne 0x4071e1
mov byte [esp + 0x22], 1
mov ecx, dword [0x4f7904]
mov ebx, dword [esp + 0x130]
test ecx, ecx
jne 0x4071ff
lea eax, [esp + 0x50]
mov dword [esp + 0x14], eax
jmp 0x4072c5
mov eax, dword [0x4f7974]
imul esi, eax, 0xd4
inc eax
add esi, ecx
xor ecx, ecx
cmp eax, dword [0x4f48d0]
mov dword [esp + 0x14], esi
cmovge eax, ecx
mov dword [0x4f7974], eax
mov eax, dword [esp + 0x138]
mov byte [esi], bl
mov byte [esi + 6], al
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
mov dword [0x4f7970], eax
sub ecx, dword [0x4fa730]
mov dword [0x4fa730], eax
movd xmm0, ecx
cvtdq2pd xmm0, xmm0
shr ecx, 0x1f
addsd xmm0, qword [ecx*8 + 0x4eea00]
cvtpd2ps xmm0, xmm0
divss xmm0, dword [0x4ee934]
movss dword [esi + 8], xmm0
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov esi, eax
mov eax, dword [esp + 0x14]
lea ecx, [eax + 0xc]
test esi, esi
je 0x4072a1
cmp esi, dword [0x4f796c]
je 0x40729a
push esi
push ecx
push 0x418
push dword [0x4f78ec]
call dword [sym.imp.USER32.dll_PostMessageW]
jmp 0x4072b0
xor edx, edx
mov word [ecx], dx
jmp 0x4072b4
mov eax, dword [0x4e1cbc]
mov dword [ecx], eax
mov eax, dword [0x4e1cc0]
mov dword [ecx + 4], eax
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x13c]
mov dword [0x4f796c], esi
mov esi, dword [esp + 0x1c]
cmp bl, 0xe7
jne 0x40731c
mov ebx, dword [esp + 0x14]
mov ecx, dword [esp + 0x12c]
push 0x7fff
push ebx
push edx
push dword [esp + 0x144]
mov ax, word [ecx + 4]
push 0
mov word [ebx + 2], ax
mov eax, 0x55
push 0xe7
push ecx
mov word [ebx + 4], ax
mov ecx, esi
push dword [esp + 0x144]
mov edx, dword [esp + 0x4c]
call fcn.00408c10
add esp, 0x20
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x114
ret
mov word [eax + 2], di
mov cl, 3
mov al, bl
add al, 0x64
cmp cl, al
sbb eax, eax
and eax, ebp
mov ebp, dword [0x4fa77c]
movzx eax, ax
mov dword [esp + 0x24], eax
cmp esi, dword [0x4f7908]
jne 0x407364
mov dl, byte [esp + 0x140]
and dl, 1
jne 0x4073c4
mov al, byte [esp + 0x138]
movzx ecx, bl
xor al, 1
shl al, 7
mov byte [ecx + 0x4f82e8], al
jmp 0x4073c4
mov ecx, dword [esp + 0x140]
mov edx, ecx
movzx esi, bl
shr edx, 4
and edx, 0xffffff01
mov dword [esp + 0x34], edx
lea eax, [esi + esi*4]
cmp byte [ebp + eax*4 + 8], 0
jne 0x4073c0
push dword [esp + 0x138]
mov dl, bl
call fcn.0040a010
mov ecx, dword [esp + 0x13c]
add esp, 4
mov ebp, dword [0x4fa77c]
mov edx, dword [esp + 0x34]
test al, al
je 0x4073ba
mov al, cl
xor al, 1
shl al, 7
mov byte [esi + 0x4f82e8], al
mov esi, dword [esp + 0x1c]
jmp 0x4073cb
mov esi, dword [esp + 0x1c]
mov ecx, dword [esp + 0x138]
cmp byte [esp + 0x22], 0
je 0x4073d9
mov eax, 0x69
jmp 0x4073eb
test dl, dl
mov eax, 0x20
mov edi, 0x61
cmovne eax, edi
movzx eax, ax
cmp byte [0x4f79a3], 0
mov edi, dword [esp + 0x14]
lea edx, [edi + 4]
mov word [edx], ax
mov dword [esp + 0x40], edx
je 0x40742f
cmp bl, 0x5b
je 0x40740c
cmp bl, 0x5c
jne 0x40742f
test cl, cl
jne 0x40742f
mov ebp, dword [esp + 0x13c]
push 0
push SysReAllocString
push 0x7fff
push edi
push ebp
push 0
push ecx
mov ecx, esi
jmp 0x408a67
cmp byte [0x4fa76e], 0
mov esi, dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov edx, dword [sym.imp.USER32.dll_FindWindowW]
je 0x4074e7
cmp bl, 0x1b
jne 0x4074e7
test cl, cl
jne 0x4074e7
push 0
push str.32771
call edx
test eax, eax
je 0x4074db
push 0
push eax
call esi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp esi, eax
jne 0x4074d5
push 0xffc3d44d
push 0
push 0
push 0
mov dl, bl
xor ecx, ecx
call fcn.004124d0
mov dl, byte [0x4f82e4]
mov ecx, 1
push 0xffc3d44d
shr dl, 3
push 0
and dl, 1
push 0
push 0
or dl, 0xa4
call fcn.004124d0
mov ebp, dword [esp + 0x15c]
add esp, 0x20
push 0
push SysReAllocString
push 0x7fff
push edi
push ebp
push 0
push ecx
mov ecx, dword [esp + 0x38]
push 0x1b
jmp 0x408a68
mov esi, dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov ebp, dword [0x4fa77c]
mov edx, dword [sym.imp.USER32.dll_FindWindowW]
mov eax, dword [esp + 0x24]
movzx eax, ax
mov dword [esp + 0x34], eax
lea ecx, [eax + eax*4]
mov eax, dword [0x4fa780]
lea edi, [eax + ecx*4]
mov eax, dword [esp + 0x1c]
mov cl, byte [edi + 0x13]
mov byte [esp + 0x1b], cl
cmp eax, dword [0x4f790c]
jne 0x407514
test cl, cl
jne 0x407527
movzx eax, bl
lea eax, [eax + eax*4]
lea edi, [eax*4]
mov eax, dword [esp + 0x1c]
add edi, ebp
cmp byte [esp + 0x22], 0
je 0x40759b
mov ecx, dword [esp + 0x13c]
mov eax, dword [esp + 0x138]
cmp ecx, 0xffc3d44e
jne 0x407562
test al, al
je 0x407562
cmp dword [0x4f840c], edi
jne 0x407562
mov byte [edi + 0xd], 0
mov byte [edi + 0x10], 0
mov dword [0x4f840c], 0
push 0x7fff
push dword [esp + 0x18]
push ecx
push eax
mov ecx, dword [esp + 0x2c]
push dword [esp + 0x34]
mov edx, dword [esp + 0x40]
push ebx
push dword [esp + 0x144]
push dword [esp + 0x144]
call fcn.00408c10
add esp, 0x20
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x114
ret
mov ecx, dword [esp + 0x138]
mov dword [esp + 0x44], 0x7fff
test cl, cl
jne 0x4075c1
mov byte [edi + 0x11], cl
mov ecx, 0x7fff
mov word [edi + 4], cx
mov ecx, dword [esp + 0x138]
cmp eax, dword [0x4f7908]
jne 0x407646
test bl, bl
jne 0x40760c
mov ebp, dword [esp + 0x13c]
mov edx, dword [esp + 0x2c]
push 0x7fff
push dword [esp + 0x18]
push ebp
push ecx
push dword [esp + 0x34]
mov ecx, eax
push 0
push dword [esp + 0x144]
push dword [esp + 0x144]
call fcn.00408c10
add esp, 0x20
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x114
ret
cmp bl, 1
je 0x407616
cmp bl, 2
jne 0x407646
cmp dword [0x4f77b4], 0
jne 0x407674
push 0
push str.32768
call edx
test eax, eax
je 0x407639
push 0
push eax
call esi
cmp eax, dword [0x4f9a38]
je 0x40766d
mov ebp, dword [0x4fa77c]
mov ecx, dword [esp + 0x138]
mov eax, dword [0x4f840c]
mov esi, dword [esp + 0x1c]
test eax, eax
je 0x4076ac
cmp eax, edi
je 0x4076ac
test cl, cl
jne 0x4076ac
cmp esi, dword [0x4f790c]
jne 0x407696
xor eax, eax
cmp byte [edi + 8], al
sete al
jmp 0x40769f
mov ecx, dword [esp + 0x138]
mov ebp, dword [esp + 0x13c]
mov al, cl
push 0x7fff
push dword [esp + 0x18]
xor al, 1
mov byte [edi + 0x10], 0
push ebp
mov byte [edi + 0xd], al
push ecx
jmp 0x40756d
mov eax, dword [0x4f840c]
movzx eax, byte [eax + 8]
test eax, eax
je 0x4076ac
mov eax, dword [0x4f840c]
mov byte [eax + 0x12], 1
cmp byte [edi + 9], 0
jne 0x4076d8
cmp byte [edi + 0xa], 0
jne 0x4076d8
mov ebp, dword [esp + 0x13c]
mov al, cl
push 0x7fff
push dword [esp + 0x18]
xor al, 1
push ebp
push ecx
mov byte [edi + 0xd], al
mov ecx, esi
jmp 0x407571
mov dword [esp + 0x38], 0
mov edx, 0x7fff
mov dword [esp + 0x28], edx
mov dword [esp + 0x30], edx
test cl, cl
je 0x40771f
mov dl, byte [edi + 0x10]
mov dh, byte [edi + 0xd]
movzx eax, word [edi + 4]
mov byte [esp + 0x13], dh
mov byte [esp + 0x12], dl
mov edx, 0x7fff
mov byte [edi + 0x10], 0
cmp ax, dx
je 0x40772f
mov dword [esp + 0x28], eax
mov dword [esp + 0x30], eax
mov word [edi + 4], dx
jmp 0x40772f
mov al, byte [esp + 0x13]
mov byte [esp + 0x13], al
mov al, byte [esp + 0x13]
mov byte [esp + 0x12], al
mov al, cl
xor cl, cl
xor al, 1
mov byte [edi + 0xd], al
cmp esi, dword [0x4f790c]
jne 0x4077a9
cmp byte [edi + 8], cl
je 0x4077cb
cmp byte [ebp + 0xcb5], cl
jne 0x40775d
cmp byte [ebp + 0xcc9], cl
jne 0x40775d
xor al, al
jmp 0x40775f
mov al, 1
cmp byte [ebp + 0xcdd], 0
mov byte [ebp + 0x161], al
jne 0x40777b
cmp byte [ebp + 0xcf1], 0
jne 0x40777b
xor al, al
jmp 0x40777d
mov al, 1
cmp byte [ebp + 0xc8d], 0
mov byte [ebp + 0x175], al
jne 0x40779f
cmp byte [ebp + 0xca1], 0
jne 0x40779f
xor al, al
mov byte [ebp + 0x14d], al
jmp 0x4077cb
mov al, 1
mov byte [ebp + 0x14d], al
jmp 0x4077cb
cmp dword [0x4f790c], 0
jne 0x4077cb
mov cl, 1
call fcn.00414ad0
mov ebp, dword [0x4fa77c]
mov cl, 1
mov byte [0x4f79ab], al
mov byte [0x4f82e4], al
mov eax, dword [edi]
test eax, eax
je 0x4077db
cmp dword [eax], 7
mov byte [esp + 0x22], 1
je 0x4077e0
mov byte [esp + 0x22], 0
test cl, cl
jne 0x4077f1
mov cl, 1
call fcn.00414ad0
mov ebp, dword [0x4fa77c]
mov cl, byte [edi + 9]
mov eax, dword [esp + 0x138]
test cl, cl
je 0x407a8f
test al, al
jne 0x407a8f
mov eax, dword [0x4f840c]
test eax, eax
je 0x407822
cmp byte [edi + 0xa], 0
je 0x407822
cmp edi, eax
jne 0x407a88
cmp cl, 1
jne 0x4078d3
cmp byte [esp + 0x1b], 0
mov ecx, dword [esp + 0x34]
movzx eax, bl
cmove ecx, eax
xor edx, edx
cmp byte [esp + 0x1b], dl
movzx eax, cx
cmovne edx, eax
mov dword [esp + 0x4c], ecx
movzx eax, cl
xor ecx, ecx
cmp byte [esp + 0x1b], cl
push 0
cmovne eax, ecx
mov cl, al
call fcn.00414ce0
mov ch, al
xor edx, edx
xor eax, eax
mov byte [esp + 0x27], ch
add esp, 4
mov dword [esp + 0x3c], edx
cmp ax, word [0x4f843c]
jae 0x4079c3
mov cl, byte [0x4f7993]
cmp byte [esp + 0x1b], 0
mov eax, dword [0x4f842c]
mov ebp, dword [eax + edx*4]
je 0x407898
movzx eax, word [ebp + 0xa]
jmp 0x40789c
movzx eax, byte [ebp + 0x11]
cmp dword [esp + 0x4c], eax
je 0x4078ab
test byte [ebp + 0xe], ch
je 0x4079a5
cmp word [ebp + 6], 0
je 0x40793e
mov al, byte [ebp + 0x19]
test al, al
je 0x4079a5
test cl, cl
jne 0x4079a5
mov ebp, dword [0x4fa77c]
mov esi, dword [esp + 0x1c]
xor dl, dl
cmp edi, dword [0x4f840c]
je 0x4078e6
mov dword [0x4f840c], edi
mov byte [edi + 0x12], dl
cmp byte [edi + 0xa], 0
je 0x407a11
mov al, byte [edi + 8]
mov cl, byte [0x4f79ab]
test al, al
je 0x407901
not al
and cl, al
test cl, cl
jne 0x407913
test dl, dl
jne 0x407913
test byte [edi + 0xc], 1
je 0x407a11
cmp esi, dword [0x4f790c]
jne 0x4079ca
cmp byte [esp + 0x1b], 0
je 0x4079ca
mov eax, dword [0x4fa774]
movzx ecx, cl
shl ecx, 9
add ecx, dword [esp + 0x34]
jmp 0x4079da
mov esi, dword [ebp + 0x20]
mov eax, esi
test eax, eax
je 0x4079a5
cmp byte [eax + 0x1c], 0
jne 0x407956
mov eax, dword [eax + 8]
test eax, eax
jne 0x407947
jmp 0x4079a5
test esi, esi
je 0x4079a5
nop word [eax + eax]
cmp byte [esi + 0x1c], 0
je 0x407996
test cl, cl
je 0x407975
mov ecx, esi
call fcn.00484b50
test al, al
je 0x407990
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x4078c9
mov edx, dword [ebp + 0x1c]
call fcn.0040be80
test eax, eax
jne 0x4078c9
mov cl, byte [0x4f7993]
mov esi, dword [esi + 8]
test esi, esi
jne 0x407960
mov edx, dword [esp + 0x3c]
mov ch, byte [esp + 0x23]
movzx eax, word [0x4f843c]
inc edx
mov dword [esp + 0x3c], edx
cmp edx, eax
jl 0x407883
mov ebp, dword [0x4fa77c]
mov esi, dword [esp + 0x1c]
mov dl, 1
jmp 0x4078e6
movzx ecx, cl
movzx eax, bl
shl ecx, 8
add ecx, eax
mov eax, dword [0x4fa770]
movzx eax, word [eax + ecx*2]
movzx ecx, ax
mov dword [esp + 0x28], ecx
mov dword [esp + 0x30], ecx
test ax, ax
jns 0x4079f4
mov word [edi + 4], ax
jmp 0x407a1d
and eax, 0x7fff
cmp ax, word [0x4f843c]
jae 0x407a11
mov ecx, eax
mov eax, dword [0x4fa778]
mov ax, word [eax + ecx*2]
mov word [edi + 4], ax
mov eax, 0x7fff
cmp word [esp + 0x28], ax
jne 0x407a88
test dl, dl
je 0x407a31
mov eax, dword [esp + 0x40]
mov ecx, 0x23
or byte [edi + 0xc], 8
mov word [eax], cx
cmp byte [edi + 8], 0
jne 0x407a6e
test byte [edi + 0xc], 1
jne 0x407a6e
cmp byte [esp + 0x22], 0
jne 0x407a6e
test dl, dl
jne 0x407a6e
mov ebp, dword [esp + 0x13c]
push 0
push SysReAllocString
push 0x7fff
push dword [esp + 0x20]
mov byte [edi + 0x11], 1
push ebp
push 0
push ecx
mov ecx, esi
jmp 0x408a67
mov ebp, dword [esp + 0x13c]
mov ecx, esi
push 0x7fff
push dword [esp + 0x18]
push ebp
push 0
jmp 0x407571
mov eax, dword [esp + 0x138]
cmp byte [edi + 0xa], 0
mov byte [esp + 0x23], 0
je 0x407b19
test al, al
je 0x407b19
mov ch, byte [esp + 0x12]
cmp dword [0x4f840c], edi
jne 0x407ab8
test ch, ch
je 0x407b19
mov dword [0x4f840c], 0
cmp byte [edi + 0xb], 0
jne 0x407b14
mov cl, byte [edi + 0xc]
test cl, 8
je 0x407ad0
xor dl, dl
and cl, 0xf7
mov byte [edi + 0xc], cl
jmp 0x407ad2
mov dl, 1
test ch, ch
je 0x407afb
test dl, dl
je 0x407afb
mov ebp, dword [esp + 0x13c]
push 0
push SysReAllocString
push 0x7fff
push dword [esp + 0x20]
push ebp
push eax
push ecx
mov ecx, esi
jmp 0x408a67
mov ebp, dword [esp + 0x13c]
mov ecx, esi
push 0x7fff
push dword [esp + 0x18]
push ebp
push eax
jmp 0x407571
mov byte [esp + 0x23], 1
cmp byte [edi + 9], 0
je 0x407cb4
test al, al
je 0x407cb4
mov eax, dword [0x4f840c]
xor ecx, ecx
cmp eax, edi
cmove eax, ecx
mov dword [0x4f840c], eax
cmp byte [edi + 0xe], cl
je 0x407b61
push 0xffc3d44d
push ecx
push ecx
mov byte [edi + 0xe], cl
mov dl, 0x12
push ecx
mov ecx, 1
call fcn.004124d0
mov ebp, dword [0x4fa77c]
add esp, 0x10
cmp byte [edi + 0xf], 0
je 0x407b8b
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0x10
mov byte [edi + 0xf], 0
mov ecx, 1
call fcn.004124d0
mov ebp, dword [0x4fa77c]
add esp, 0x10
mov edx, dword [esp + 0x28]
mov eax, 0x7fff
cmp dx, ax
jne 0x407bc4
mov al, byte [edi + 0xc]
test al, 8
je 0x407bc4
and al, 0xf7
mov byte [edi + 0xc], al
mov ebp, dword [esp + 0x13c]
push 0x7fff
push dword [esp + 0x18]
mov ecx, esi
push ebp
push dword [esp + 0x144]
jmp 0x407571
mov cl, byte [esp + 0x22]
mov al, byte [edi + 0x12]
test cl, cl
je 0x407c5d
cmp al, 2
jne 0x407c31
mov ebp, dword [esp + 0x24]
mov dl, bl
push 0xffc3d44e
push 0
push 0
push ebp
mov ecx, 1
call fcn.004124d0
push 0xffc3d44d
push 0
push 0
push ebp
mov dl, bl
mov ecx, 2
call fcn.004124d0
add esp, 0x20
mov ebp, dword [esp + 0x13c]
push 0
push SysReAllocString
push 0x7fff
push dword [esp + 0x20]
push ebp
push dword [esp + 0x14c]
push ecx
mov ecx, esi
jmp 0x408a67
cmp al, 1
je 0x407ba5
cmp byte [edi + 0xa], 0
jne 0x407ca2
cmp byte [edi + 8], 0
jne 0x407ba5
test byte [edi + 0xc], 1
jne 0x407ba5
test cl, cl
jne 0x407ba5
jmp 0x407c0a
test al, al
je 0x407c39
mov eax, 0x7fff
cmp dx, ax
jne 0x407c39
cmp byte [edi + 8], 0
jne 0x407ba5
test byte [edi + 0xc], 1
mov ebp, dword [esp + 0x13c]
jne 0x407bac
push 0
push SysReAllocString
push eax
push dword [esp + 0x20]
push ebp
push dword [esp + 0x14c]
push ecx
mov ecx, esi
jmp 0x408a67
cmp byte [esp + 0x13], 0
jne 0x407cb8
cmp byte [edi + 0xb], 0
jne 0x407cb8
jmp 0x407ba5
mov edx, dword [esp + 0x28]
cmp dword [0x4f840c], 0
mov byte [esp + 0x12], 0
je 0x4080b9
mov ecx, dword [esp + 0x138]
test cl, cl
je 0x407cdf
cmp byte [edi + 0xb], 0
je 0x4080b9
mov eax, 0x7fff
cmp dx, ax
jne 0x408427
movzx eax, word [edi + 6]
xor esi, esi
mov dword [esp + 0x3c], eax
cmp ax, word [esp + 0x44]
je 0x407e9f
mov ecx, eax
mov eax, dword [0x4f842c]
movzx ecx, cx
mov edx, dword [eax + ecx*4]
mov al, byte [edx + 0x11]
test al, al
jne 0x407d1d
cmp word [edx + 0xa], 0
je 0x407d92
movzx ecx, word [edx + 0xc]
mov dword [esp + 0x3c], ecx
test al, al
je 0x407d3a
movzx eax, al
lea eax, [eax + eax*4]
lea eax, [eax*4]
add eax, ebp
jmp 0x407d4d
movzx eax, word [edx + 0xa]
lea ecx, [eax + eax*4]
mov eax, dword [0x4fa780]
lea eax, [eax + ecx*4]
mov ecx, dword [esp + 0x3c]
cmp byte [eax + 0xd], 0
je 0x407d80
cmp byte [edx + 0x16], 0
je 0x407d71
cmp byte [esp + 0x138], 0
jne 0x407d90
mov ax, word [edx + 4]
mov word [edi + 4], ax
test esi, esi
jne 0x407d9a
jmp 0x407d80
cmp byte [esp + 0x138], 0
jne 0x407d80
test esi, esi
cmove esi, edx
mov eax, 0x7fff
cmp cx, ax
jne 0x407d04
jmp 0x407d92
mov esi, edx
test esi, esi
je 0x407e94
movzx ecx, byte [esi + 0x11]
cmp ecx, 0x12
ja case.0x407daa.1
movzx eax, byte [ecx + 0x408a98]
jmp dword [eax*4 + 0x408a84]
cmp byte [ebp + 0xca1], 0
mov eax, 0xc80
mov ecx, 0xc94
cmovne eax, ecx
jmp 0x407e0e
cmp byte [ebp + 0xcc9], 0
mov eax, 0xca8
mov ecx, 0xcbc
cmovne eax, ecx
jmp 0x407e0e
cmp byte [ebp + 0xcf1], 0
mov eax, 0xcd0
mov ecx, 0xce4
cmovne eax, ecx
jmp 0x407e0e
movzx eax, word [esi + 0xa]
lea ecx, [eax + eax*4]
mov eax, dword [0x4fa780]
lea eax, [eax + ecx*4]
jmp 0x407e10
lea eax, [ecx + ecx*4]
lea eax, [eax*4]
add eax, ebp
mov dword [0x4f840c], eax
movzx eax, word [esi + 6]
test ax, ax
je 0x407e24
mov dword [esp + 0x30], eax
jmp 0x407e77
movzx eax, word [esi + 4]
lea ecx, [esp + 0x30]
mov ebp, dword [esp + 0x13c]
mov dl, byte [esp + 0x138]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x40]
push eax
lea eax, [esp + 0x16]
push eax
lea eax, [edi + 0xc]
push eax
push ebp
call fcn.0040c9a0
add esp, 0x10
mov dword [esp + 0x38], eax
test eax, eax
jne 0x407e73
push 0x7fff
push dword [esp + 0x18]
push ebp
push dword [esp + 0x144]
jmp 0x40756d
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x138]
mov dword [esp + 0x28], eax
mov edx, dword [esp + 0x28]
movzx ebp, ax
mov eax, dword [0x4f840c]
mov byte [eax + 0x12], 2
jmp 0x407ea3
mov ecx, dword [esp + 0x138]
mov edx, dword [esp + 0x28]
mov ebp, dword [esp + 0x3c]
mov eax, 0x7ffe
cmp bp, ax
je 0x407ebb
mov eax, 0x7ffd
cmp bp, ax
jne 0x4080b9
test cl, cl
jne 0x407ec3
mov byte [edi + 0x10], 1
test byte [0x4f82e4], 0xc
jne 0x407eea
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0x12
xor ecx, ecx
call fcn.004124d0
mov ecx, dword [esp + 0x148]
add esp, 0x10
cmp bl, 0xa2
je 0x407ef4
cmp bl, 0xa3
jne 0x407f17
mov esi, dword [esp + 0x24]
test cl, cl
jne 0x407f1b
push 0xffc3d44d
push 0
push 0
push esi
mov dl, bl
mov ecx, 1
call fcn.004124d0
add esp, 0x10
jmp 0x407f1b
mov esi, dword [esp + 0x24]
mov eax, dword [0x4f840c]
mov byte [eax + 0xe], 1
mov eax, 0x7ffd
cmp bp, ax
jne 0x407f5c
test byte [0x4f82e4], 0x30
jne 0x407f4e
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0x10
xor ecx, ecx
call fcn.004124d0
add esp, 0x10
mov eax, dword [0x4f840c]
mov byte [eax + 0xf], 1
jmp 0x407fd9
mov eax, 0x7ffe
cmp bp, ax
jne 0x407fd9
cmp bl, 0xa0
je 0x407f70
cmp bl, 0xa1
jne 0x407f93
cmp byte [esp + 0x138], 0
jne 0x407f93
push 0xffc3d44d
push 0
push 0
push esi
mov dl, bl
mov ecx, 1
call fcn.004124d0
add esp, 0x10
test byte [0x4f82e4], 0x10
je 0x407fb6
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0xa0
mov ecx, 1
call fcn.004124d0
add esp, 0x10
test byte [0x4f82e4], 0x20
je 0x407fd9
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0xa1
mov ecx, 1
call fcn.004124d0
add esp, 0x10
test byte [0x4f82e4], 1
je 0x407ffc
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0xa2
mov ecx, 1
call fcn.004124d0
add esp, 0x10
test byte [0x4f82e4], 2
je 0x40801f
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0xa3
mov ecx, 1
call fcn.004124d0
add esp, 0x10
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 9
mov ecx, 2
call fcn.004124d0
mov eax, 0x7ffd
add esp, 0x10
cmp bp, ax
jne 0x408080
mov eax, dword [0x4f840c]
cmp byte [eax + 0xf], 0
je 0x408080
cmp bl, 0x60
jb 0x408058
cmp bl, 0x69
jbe 0x40805d
cmp bl, 0x6e
jne 0x408080
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0x10
mov ecx, 1
call fcn.004124d0
mov eax, dword [0x4f840c]
add esp, 0x10
mov byte [eax + 0xf], 0
mov eax, dword [esp + 0x40]
mov ecx, 0x68
mov word [eax], cx
mov eax, dword [esp + 0x138]
test al, al
jne 0x40809b
mov byte [edi + 0x11], 1
mov ebp, dword [esp + 0x13c]
push 0
push SysReAllocString
push 0x7fff
push dword [esp + 0x20]
push ebp
push eax
jmp 0x408a62
mov eax, 0x7fff
cmp dx, ax
jne 0x408420
mov al, byte [edi + 8]
mov dl, byte [0x4f79ab]
test al, al
je 0x4080d8
not al
and dl, al
mov eax, dword [esp + 0x1c]
mov dh, byte [esp + 0x1b]
cmp eax, dword [0x4f790c]
jne 0x408100
test dh, dh
je 0x408100
mov eax, dword [0x4fa774]
movzx ecx, dl
shl ecx, 9
add ecx, dword [esp + 0x34]
movzx ebp, bl
jmp 0x408110
mov eax, dword [0x4fa770]
movzx ecx, dl
movzx ebp, bl
shl ecx, 8
add ecx, ebp
movzx eax, word [eax + ecx*2]
movzx ecx, ax
movzx esi, ax
mov dword [esp + 0x28], ecx
mov dword [esp + 0x30], ecx
mov ecx, esi
cmp ax, word [esp + 0x44]
jne 0x4081a6
cmp byte [0x4fa76e], 0
je 0x4081a6
cmp bl, 9
je 0x4081a6
mov eax, dword [esp + 0x1c]
and dl, 0xf3
cmp eax, dword [0x4f790c]
jne 0x40815d
test dh, dh
je 0x40815d
mov eax, dword [0x4fa774]
movzx ecx, dl
shl ecx, 9
add ecx, dword [esp + 0x34]
jmp 0x40816a
mov eax, dword [0x4fa770]
movzx ecx, dl
shl ecx, 8
add ecx, ebp
movzx eax, word [eax + ecx*2]
mov esi, 0x7ff9
movzx edx, ax
movzx ecx, ax
and eax, 0x7fff
mov dword [esp + 0x28], edx
mov dword [esp + 0x30], edx
cmp ax, si
jbe 0x408195
mov ebp, 0x7fff
cmp ax, bp
jb 0x4081aa
mov edx, 0x7fff
mov dword [esp + 0x28], edx
mov ecx, edx
mov dword [esp + 0x30], edx
jmp 0x4081aa
mov edx, dword [esp + 0x28]
movzx eax, cx
test ax, ax
jns 0x4082ac
mov ecx, dword [esp + 0x138]
test cl, cl
jne 0x408370
mov ah, byte [0x4f79ab]
mov al, ah
mov word [edi + 4], dx
and al, 0xc0
movzx ecx, al
mov al, ah
neg ecx
sbb ecx, ecx
and ecx, 8
mov edx, ecx
or edx, 1
and al, 0xc
mov al, ah
cmove edx, ecx
mov ecx, edx
or ecx, 4
and al, 0x30
mov al, ah
cmove ecx, edx
movzx edx, word [edi + 6]
mov esi, ecx
or esi, 2
and al, 3
mov eax, 0x7fff
cmove esi, ecx
cmp dx, ax
je 0x408275
mov ebp, dword [0x4f842c]
movzx eax, dx
mov ecx, dword [ebp + eax*4]
cmp byte [ecx + 0x15], 0
movzx edx, word [ecx + 0xc]
jne 0x40823b
movzx eax, byte [ecx + 0xf]
mov ebx, dword [esp + 0x130]
not eax
test byte [0x4f79ab], al
jne 0x40826b
cmp byte [ecx + 0x16], 0
jne 0x40826b
cmp byte [ecx + 0x11], 0
jne 0x40826b
cmp word [ecx + 0xa], 0
jne 0x40826b
cmp word [ecx + 6], 0
jne 0x40826b
mov eax, esi
not eax
test dword [ecx], eax
jne 0x40826b
movzx eax, byte [0x4f79ab]
not eax
test byte [ecx + 0xe], al
je 0x408291
mov eax, 0x7fff
cmp dx, ax
jne 0x408215
mov ecx, dword [esp + 0x138]
mov eax, 0x7fff
movzx edx, ax
mov dword [esp + 0x28], edx
mov dword [esp + 0x30], edx
jmp 0x408374
movzx eax, word [ecx + 4]
mov ecx, dword [esp + 0x138]
movzx edx, ax
mov dword [esp + 0x28], edx
mov dword [esp + 0x30], edx
jmp 0x408374
mov edx, 0x7fff
cmp ax, dx
je 0x4083c6
mov ecx, dword [esp + 0x138]
and eax, edx
test cl, cl
je 0x40834b
cmp ax, word [0x4f843c]
jae 0x408337
mov esi, eax
mov eax, dword [0x4fa778]
cmp word [eax + esi*2], dx
je 0x408337
cmp byte [esp + 0x23], 0
mov ebp, dword [esp + 0x13c]
jne 0x408324
push dword [esp + 0x40]
lea eax, [esp + 0x16]
mov dl, cl
push eax
lea eax, [edi + 0xc]
push eax
push ebp
lea ecx, [esp + 0x40]
call fcn.0040c9a0
mov ecx, dword [esp + 0x148]
add esp, 0x10
mov dword [esp + 0x38], eax
test eax, eax
je 0x408324
mov edx, dword [esp + 0x30]
mov dword [esp + 0x28], edx
jmp 0x40837b
mov eax, dword [0x4fa778]
movzx edx, word [eax + esi*2]
mov dword [esp + 0x28], edx
mov dword [esp + 0x30], edx
jmp 0x40837b
cmp byte [esp + 0x23], 0
mov ebp, dword [esp + 0x13c]
jne 0x40838b
mov edx, dword [esp + 0x28]
jmp 0x40837b
mov edx, dword [esp + 0x28]
cmp ax, word [0x4f843c]
jae 0x408374
mov ecx, eax
mov eax, dword [0x4fa778]
mov ax, word [eax + ecx*2]
mov ecx, dword [esp + 0x138]
mov word [edi + 4], ax
jmp 0x408374
mov edx, dword [esp + 0x28]
mov ebp, dword [esp + 0x13c]
mov eax, 0x7fff
cmp dx, ax
jne 0x408427
mov edx, eax
mov eax, dword [esp + 0x138]
test al, al
je 0x4083de
cmp byte [edi + 8], 0
jne 0x4083cf
test byte [edi + 0xc], 1
jne 0x4083cf
cmp byte [edi + 9], 0
je 0x4083cf
cmp byte [esp + 0x22], 0
jne 0x4083cf
push 0
push SysReAllocString
push 0x7fff
push dword [esp + 0x20]
push ebp
push eax
jmp 0x408a62
mov ebp, dword [esp + 0x13c]
jmp 0x40838b
push 0x7fff
push dword [esp + 0x18]
push ebp
jmp 0x40756c
cmp word [edi + 4], dx
lea ecx, [edi + 4]
je 0x40840f
mov ebp, dword [esp + 0x13c]
lea eax, [esp + 0x12]
push 0
push eax
lea eax, [edi + 0xc]
mov dl, 1
push eax
push ebp
call fcn.0040c9a0
add esp, 0x10
cmp byte [esp + 0x12], 0
je 0x4084ec
push 0x7fff
push dword [esp + 0x18]
push ebp
push 0
jmp 0x40756d
mov ecx, dword [esp + 0x138]
mov al, byte [edi + 0xc]
lea esi, [edi + 0xc]
test al, 8
je 0x40843e
test cl, cl
je 0x40843e
and al, 0xf7
mov byte [esp + 0x12], 1
mov byte [esi], al
mov ebp, dword [esp + 0x13c]
mov eax, edx
and eax, 0x7fff
cmp ax, word [0x4f843c]
jae 0x40850a
cmp dword [esp + 0x38], 0
jne 0x40850a
push dword [esp + 0x40]
lea eax, [esp + 0x16]
mov dl, cl
push eax
push esi
push ebp
lea ecx, [esp + 0x40]
call fcn.0040c9a0
add esp, 0x10
mov dword [esp + 0x38], eax
test eax, eax
jne 0x408504
mov eax, dword [esp + 0x40]
cmp word [eax], 0x69
je 0x407e5d
mov eax, dword [esp + 0x138]
test al, al
je 0x4084b1
cmp byte [edi + 0x11], 0
je 0x4083cf
jmp 0x4083af
lea ecx, [edi + 4]
mov eax, 0x7fff
cmp word [ecx], ax
je 0x40840f
push 0
lea eax, [esp + 0x16]
mov byte [esp + 0x16], 0
push eax
push esi
push ebp
mov dl, 1
call fcn.0040c9a0
add esp, 0x10
cmp byte [esp + 0x12], 0
jne 0x40840f
and byte [esi], 0xf7
mov byte [edi + 0x11], 1
push 0
push SysReAllocString
push 0x7fff
push dword [esp + 0x20]
push ebp
push 0
jmp 0x408a62
mov ecx, dword [esp + 0x30]
jmp 0x40850e
mov ecx, dword [esp + 0x28]
and ecx, 0x7fff
test byte [0x4f82e4], 0xcc
mov dword [esp + 0x28], ecx
je 0x4085b8
cmp byte [esp + 0x12], 0
jne 0x4085b8
cmp byte [0x4fa76d], 0
jne 0x408545
mov eax, dword [esp + 0x1c]
cmp eax, dword [0x4f7908]
jne 0x4085b8
test byte [0x4f82e4], 0xc0
mov dh, byte [0x4f79aa]
je 0x408571
test dh, 0xc0
jne 0x408564
mov dl, 0xc0
call fcn.0040cbf0
test al, al
je 0x40856d
mov byte [0x4fa76c], 1
jmp 0x4085b8
mov ecx, dword [esp + 0x28]
cmp byte [0x4fa76c], 0
jne 0x4085b8
mov al, byte [0x4f82e4]
test al, 0xc
je 0x4085b8
test al, 3
jne 0x4085b8
test dh, 0xc
jne 0x408597
mov dl, 0xc
call fcn.0040cbf0
test al, al
je 0x4085b8
cmp dword [0x4f790c], 0
je 0x4085a9
mov byte [0x4fa76c], 1
jmp 0x4085b8
mov edx, 0xffc3d44d
mov ecx, 2
call fcn.00412ae0
mov eax, dword [esp + 0x28]
movzx ecx, ax
lea eax, [ecx - 0x7ffa]
cmp eax, 4
ja case.default.0x4085ce
jmp dword [eax*4 + 0x408aac]
cmp byte [0x4fa76e], 0
je 0x407e5d
xor al, al
test byte [0x4f82e4], 4
je 0x4085f4
mov edx, 0xa4
jmp 0x408606
test byte [0x4f82e4], 8
movzx edx, al
mov eax, 0xa5
cmovne edx, eax
cmp byte [0x4fa76e], 0
mov dword [esp + 0x44], edx
je 0x408693
mov eax, 0x7ffb
cmp word [esp + 0x28], ax
je case.0x4085ce.32765
test dl, dl
movzx eax, dl
push 0xffc3d44d
mov ecx, 0x12
cmovne ecx, eax
push 0
push 0
mov dl, cl
mov ecx, 1
push 0
call fcn.004124d0
add esp, 0x10
cmp byte [edi + 8], 0
je 0x408682
cmp bl, 0x5b
je 0x408682
cmp bl, 0x5c
je 0x408682
cmp byte [esp + 0x138], 0
jne 0x408682
push 0xffc3d44d
push 0
push 0
push 0
mov dl, bl
mov ecx, 1
call fcn.004124d0
add esp, 0x10
mov byte [0x4fa76e], 0
mov edx, 0x7fff
jmp 0x408934
cmp bl, 0xa4
je 0x4086a2
mov byte [esp + 0x23], 0
cmp bl, 0xa5
jne 0x4086a7
mov byte [esp + 0x23], 1
cmp bl, 0xa0
je 0x4086b5
cmp bl, 0xa1
je 0x4086b5
xor cl, cl
jmp 0x4086b7
mov cl, 1
mov byte [esp + 0x1b], cl
cmp bl, 0xa2
je 0x4086ca
mov byte [esp + 0x13], 0
cmp bl, 0xa3
jne 0x4086cf
mov byte [esp + 0x13], 1
xor dl, dl
test byte [0x4f82e4], 0x10
mov dword [esp + 0x38], edx
je 0x4086e2
mov dl, 0xa0
jmp 0x408705
test byte [0x4f82e4], 0x20
mov eax, dword [esp + 0x138]
je 0x4086f6
mov dl, 0xa1
jmp 0x40870c
test al, al
jne 0x408710
test cl, cl
movzx edx, dl
movzx eax, bl
cmovne edx, eax
mov eax, dword [esp + 0x138]
mov dword [esp + 0x38], edx
xor cl, cl
test byte [0x4f82e4], 1
mov dword [esp + 0x34], ecx
je 0x408726
mov byte [esp + 0x34], 0xa2
jmp 0x40874c
test byte [0x4f82e4], 2
je 0x408736
mov byte [esp + 0x34], 0xa3
jmp 0x40874c
test al, al
jne 0x40874c
cmp byte [esp + 0x13], 0
movzx ecx, cl
movzx eax, bl
cmovne ecx, eax
mov dword [esp + 0x34], ecx
mov byte [esp + 0x13], 0
test dl, dl
je 0x408772
push 0xffc3d44d
push 0
push 0
push 0
mov ecx, 1
call fcn.004124d0
add esp, 0x10
mov byte [esp + 0x13], 1
mov eax, dword [esp + 0x34]
test al, al
je 0x408794
push 0xffc3d44d
push 0
push 0
push 0
mov dl, al
mov ecx, 1
call fcn.004124d0
add esp, 0x10
cmp byte [esp + 0x23], 0
je 0x4087a9
cmp byte [esp + 0x138], 0
jne 0x4087b1
mov al, bl
jmp 0x4087ad
mov eax, dword [esp + 0x44]
test al, al
jne 0x4087c8
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0x12
xor ecx, ecx
call fcn.004124d0
add esp, 0x10
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 9
mov ecx, 2
call fcn.004124d0
add esp, 0x10
cmp byte [esp + 0x13], 0
je 0x408809
cmp byte [esp + 0x1b], 0
jne 0x408809
mov dl, byte [esp + 0x38]
xor ecx, ecx
push 0xffc3d44d
push 0
push 0
push 0
call fcn.004124d0
add esp, 0x10
mov byte [0x4fa76e], 1
mov edx, 0x7fff
jmp 0x408934
cmp byte [0x4fa76e], 0
je 0x407e5d
mov eax, dword [esp + 0x138]
test al, al
jne 0x408867
cmp bl, 0xa2
je 0x408846
cmp bl, 0xa3
je 0x408846
cmp bl, 0xa0
je 0x408846
cmp bl, 0xa1
jne 0x408867
push 0xffc3d44d
push 0
push 0
push 0
mov dl, bl
mov ecx, 1
call fcn.004124d0
mov eax, dword [esp + 0x148]
add esp, 0x10
test byte [0x4f82e4], 0xc
je 0x40887e
test al, al
je 0x408895
cmp bl, 0xa4
je 0x40887e
cmp bl, 0xa5
jne 0x408895
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0x12
xor ecx, ecx
call fcn.004124d0
add esp, 0x10
mov eax, 0x7ffd
mov byte [esp + 0x13], 0
cmp word [esp + 0x28], ax
jne 0x4088cb
test byte [0x4f82e4], 0x30
jne 0x4088cb
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0x10
xor ecx, ecx
call fcn.004124d0
add esp, 0x10
mov byte [esp + 0x13], 1
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 9
mov ecx, 2
call fcn.004124d0
add esp, 0x10
cmp byte [esp + 0x13], 0
je 0x408689
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0x10
mov ecx, 1
call fcn.004124d0
add esp, 0x10
mov edx, 0x7fff
jmp 0x408934
mov edx, ecx
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x48], edx
mov eax, dword [ecx + 4]
test eax, eax
je 0x408934
cmp byte [eax], 5
jb 0x408934
movzx eax, word [ecx + 0x14]
shl eax, 0x10
or edx, eax
mov dword [esp + 0x48], edx
cmp byte [esp + 0x22], 0
mov ecx, 0x68
mov eax, dword [esp + 0x40]
mov word [eax], cx
mov ecx, dword [esp + 0x138]
je 0x4089ac
test cl, cl
je 0x4089ee
cmp byte [edi + 9], 0
je 0x4089ac
mov esi, dword [esp + 0x24]
mov dl, bl
push 0xffc3d44e
push 0
push 0
push esi
mov ecx, 1
call fcn.004124d0
push 0xffc3d44d
push 0
push 0
push esi
mov dl, bl
mov ecx, 2
call fcn.004124d0
mov eax, dword [esp + 0x68]
add esp, 0x20
push 0
push SysReAllocString
push eax
push dword [esp + 0x20]
push ebp
push dword [esp + 0x14c]
jmp 0x408a62
test cl, cl
je 0x4089ee
cmp byte [edi + 8], 0
je 0x4089c9
cmp byte [edi + 0x11], 0
je 0x408a0f
push 0
push SysReAllocString
push edx
jmp 0x408a5c
cmp byte [esp + 0x12], 0
je 0x408a48
mov eax, dword [esp + 0x1c]
push edx
push dword [esp + 0x18]
push ebp
push ecx
push dword [esp + 0x34]
mov ecx, eax
push ebx
push dword [esp + 0x144]
jmp 0x4072fe
mov eax, dword [0x4f840c]
mov byte [edi + 0x10], 1
test eax, eax
je 0x408a05
cmp byte [eax + 8], 0
je 0x408a05
mov byte [eax + 0x12], 2
cmp byte [esp + 0x12], 0
je 0x408a1b
or byte [esi], 8
push edx
push dword [esp + 0x18]
push ebp
push ecx
jmp 0x40756d
cmp bl, 0xa4
je 0x408a25
cmp bl, 0xa5
jne 0x408a48
push 0xffc3d450
push 0
push 0
push dword [esp + 0x30]
mov dl, bl
mov ecx, 1
call fcn.004124d0
mov ecx, dword [esp + 0x148]
add esp, 0x10
test cl, cl
jne 0x408a50
mov byte [edi + 0x11], 1
mov eax, dword [esp + 0x48]
push 0
push SysReAllocString
push eax
push dword [esp + 0x20]
push ebp
push ecx
push ecx
mov ecx, dword [esp + 0x38]
push ebx
mov edx, dword [esp + 0x14c]
call fcn.00408ac0
add esp, 0x20
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x114
ret