Function at 0x4077f0
Capabilities:
Check for time delay via gettickcount
Encrypt data using speck

Disassembly:
sub esp, 0x110
push ebx
push ebp
push esi
push edi
mov di, word [esp + 0x130]
mov esi, ecx
mov dword [esp + 0x28], edx
mov eax, 0x7fff
mov edx, dword [esp + 0x138]
mov dword [esp + 0x1c], esi
movzx ebp, di
mov dword [esp + 0x40], eax
cmp edx, 0xffc3d44f
je 0x40783c
cmp edx, 0xffc3d44e
je 0x40783c
mov byte [esp + 0x1a], 0
cmp edx, 0xffc3d44d
jne 0x407841
mov byte [esp + 0x1a], 1
mov ecx, dword [0x4e982c]
mov ebx, dword [esp + 0x12c]
test ecx, ecx
jne 0x40785f
lea eax, [esp + 0x4c]
mov dword [esp + 0x14], eax
jmp 0x407923
mov eax, dword [0x4e989c]
imul esi, eax, 0xd4
inc eax
add esi, ecx
xor ecx, ecx
cmp eax, dword [0x4e7028]
mov dword [esp + 0x14], esi
cmovge eax, ecx
mov dword [0x4e989c], eax
mov eax, dword [esp + 0x134]
mov byte [esi], bl
mov byte [esi + 6], al
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
mov dword [0x4e9898], eax
sub ecx, dword [0x4ec504]
mov dword [0x4ec504], eax
movd xmm0, ecx
cvtdq2pd xmm0, xmm0
shr ecx, 0x1f
addsd xmm0, qword [ecx*8 + 0x4e1500]
cvtpd2ps xmm0, xmm0
divss xmm0, dword [0x4e13f4]
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 0x407905
cmp esi, dword [0x4e9894]
je 0x4078fe
push esi
push ecx
push 0x418
push dword [0x4e9814]
call dword [sym.imp.USER32.dll_PostMessageW]
mov eax, dword [esp + 0x14]
jmp 0x407912
xor edx, edx
mov word [ecx], dx
jmp 0x407912
mov dword [ecx], 0x2f004e
mov dword [ecx + 4], 0x41
mov edx, dword [esp + 0x138]
mov dword [0x4e9894], esi
mov esi, dword [esp + 0x1c]
cmp bl, 0xe7
jne 0x40797a
mov ebx, dword [esp + 0x14]
mov ecx, dword [esp + 0x128]
push 0x7fff
push ebx
push edx
push dword [esp + 0x140]
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 + 0x140]
mov edx, dword [esp + 0x48]
call fcn.004092c0
add esp, 0x20
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x110
ret
mov word [eax + 2], di
mov cl, 3
mov al, bl
mov edi, 0x20
add al, 0x64
cmp cl, al
sbb eax, eax
and eax, ebp
cmp esi, dword [0x4e9830]
mov esi, dword [0x4ec6b8]
movzx eax, ax
mov dword [esp + 0x20], eax
jne 0x4079d8
mov cl, byte [esp + 0x13c]
mov edx, dword [esp + 0x134]
and cl, 1
mov dword [esp + 0x30], ecx
jne 0x407a6c
movzx ecx, bl
mov al, dl
xor al, 1
shl al, 7
mov byte [ecx + 0x4ea228], al
mov ecx, dword [esp + 0x30]
jmp 0x407a6c
mov edx, dword [esp + 0x13c]
mov ecx, edx
movzx ebp, bl
shr ecx, 4
and ecx, 0xffffff01
mov dword [esp + 0x30], ecx
lea eax, [ebp*4]
add eax, ebp
cmp byte [esi + eax*4 + 8], 0
jne 0x407a65
test dl, 0x10
jne 0x407a65
cmp bl, 0xa0
je 0x407a10
cmp bl, 0xa1
jne 0x407a35
mov edx, dword [esp + 0x134]
test dl, dl
jne 0x407a35
cmp bl, 0xa0
mov dword [esp + 0x3c], 0x10
mov eax, edi
cmove eax, dword [esp + 0x3c]
test byte [0x4e98cf], al
jne 0x407a6c
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edx, dword [esp + 0x134]
mov ecx, dword [esp + 0x30]
mov esi, dword [0x4ec6b8]
mov dword [0x4ec674], eax
mov dword [0x4ec670], eax
mov al, dl
xor al, 1
shl al, 7
mov byte [ebp + 0x4ea228], al
jmp 0x407a6c
mov edx, dword [esp + 0x134]
cmp byte [esp + 0x1a], 0
je 0x407a7a
mov eax, 0x69
jmp 0x407a87
mov eax, 0x61
test cl, cl
cmovne edi, eax
movzx eax, di
cmp byte [0x4e98cb], 0
mov edi, dword [esp + 0x14]
lea ecx, [edi + 4]
mov word [ecx], ax
mov dword [esp + 0x38], ecx
je 0x407ac8
cmp bl, 0x5b
je 0x407aa8
cmp bl, 0x5c
jne 0x407ac8
test dl, dl
jne 0x407ac8
mov ebp, dword [esp + 0x138]
push 0
push SysReAllocString
push 0x7fff
push edi
push ebp
push 0
jmp 0x40910e
cmp byte [0x4ec6aa], 0
mov ebp, dword [sym.imp.USER32.dll_FindWindowW]
je 0x407b6e
cmp bl, 0x1b
jne 0x407b6e
test dl, dl
jne 0x407b6e
push 0
push str.32771
call ebp
test eax, eax
je 0x407b68
push 0
push eax
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp esi, eax
jne 0x407b68
push 0xffc3d44d
push 0
push 0
push 0
mov dl, bl
xor ecx, ecx
call fcn.00413020
mov dl, byte [0x4e98d6]
mov ecx, 1
push 0xffc3d44d
shr dl, 3
push 0
and dl, 1
push 0
push 0
or dl, 0xa4
call fcn.00413020
mov ebp, dword [esp + 0x158]
add esp, 0x20
push 0
push SysReAllocString
push 0x7fff
push edi
push ebp
push 0
push ecx
push 0x1b
jmp 0x409110
mov esi, dword [0x4ec6b8]
mov edx, dword [esp + 0x20]
movzx eax, dx
mov dword [esp + 0x30], eax
lea ecx, [eax + eax*4]
mov eax, dword [0x4ec6bc]
lea edi, [eax + ecx*4]
mov eax, dword [esp + 0x1c]
mov cl, byte [edi + 0x13]
mov byte [esp + 0x19], cl
cmp eax, dword [0x4e9834]
jne 0x407b9b
test cl, cl
jne 0x407ba4
movzx eax, bl
lea eax, [eax + eax*4]
lea edi, [esi + eax*4]
cmp byte [esp + 0x1a], 0
je 0x407c15
mov ecx, dword [esp + 0x138]
mov eax, dword [esp + 0x134]
cmp ecx, 0xffc3d44e
jne 0x407bdf
test al, al
je 0x407bdf
cmp dword [0x4ea348], edi
jne 0x407bdf
mov byte [edi + 0xd], 0
mov byte [edi + 0x10], 0
mov dword [0x4ea348], 0
push 0x7fff
push dword [esp + 0x18]
push ecx
push eax
push edx
mov edx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x30]
push ebx
push dword [esp + 0x140]
push dword [esp + 0x140]
call fcn.004092c0
add esp, 0x20
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x110
ret
mov ecx, dword [esp + 0x134]
mov eax, 0x7fff
mov dword [esp + 0x48], eax
test cl, cl
jne 0x407c30
mov byte [edi + 0x11], cl
mov word [edi + 4], ax
mov esi, dword [esp + 0x1c]
cmp esi, dword [0x4e9830]
jne 0x407cb8
test bl, bl
jne 0x407c7c
mov ebp, dword [esp + 0x138]
push 0x7fff
push dword [esp + 0x18]
push ebp
push ecx
push edx
push 0
push dword [esp + 0x140]
mov edx, dword [esp + 0x44]
mov ecx, esi
push dword [esp + 0x140]
call fcn.004092c0
add esp, 0x20
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x110
ret
cmp bl, 1
je 0x407c86
cmp bl, 2
jne 0x407cb8
cmp dword [0x4e96dc], 0
jne 0x407ce6
push 0
push str.32768
call ebp
test eax, eax
je 0x407cad
push 0
push eax
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
cmp eax, dword [0x4eb104]
je 0x407cdb
mov ecx, dword [esp + 0x134]
mov edx, dword [esp + 0x20]
mov eax, dword [0x4ea348]
test eax, eax
je 0x407d20
cmp eax, edi
je 0x407d20
test cl, cl
jne 0x407d20
cmp esi, dword [0x4e9834]
jne 0x407d0a
xor eax, eax
cmp byte [edi + 8], al
sete al
jmp 0x407d13
mov ecx, dword [esp + 0x134]
mov edx, dword [esp + 0x20]
mov byte [edi + 0x10], 0
mov ebp, dword [esp + 0x138]
mov al, cl
push 0x7fff
push dword [esp + 0x18]
xor al, 1
push ebp
push ecx
push edx
mov byte [edi + 0xd], al
push ebx
jmp 0x407c55
mov eax, dword [0x4ea348]
movzx eax, byte [eax + 8]
test eax, eax
je 0x407d20
mov eax, dword [0x4ea348]
mov byte [eax + 0x12], 1
cmp byte [edi + 9], 0
jne 0x407d2c
cmp byte [edi + 0xa], 0
je 0x407cea
mov dword [esp + 0x34], 0
mov ebp, 0x7fff
mov dword [esp + 0x24], ebp
mov dword [esp + 0x2c], ebp
test cl, cl
je 0x407d72
mov dh, byte [edi + 0x10]
mov al, byte [edi + 0xd]
mov byte [esp + 0x13], al
movzx eax, word [edi + 4]
mov byte [esp + 0x12], dh
mov edx, ebp
mov byte [edi + 0x10], 0
cmp ax, dx
je 0x407d82
mov ebp, eax
mov word [edi + 4], dx
mov dword [esp + 0x24], ebp
mov dword [esp + 0x2c], ebp
jmp 0x407d82
mov al, byte [esp + 0x13]
mov byte [esp + 0x13], al
mov al, byte [esp + 0x13]
mov byte [esp + 0x12], al
mov al, cl
xor dl, dl
xor al, 1
mov byte [edi + 0xd], al
cmp esi, dword [0x4e9834]
jne 0x407e01
cmp byte [edi + 8], dl
je 0x407e1d
mov eax, dword [0x4ec6b8]
cmp byte [eax + 0xcb5], dl
jne 0x407db5
cmp byte [eax + 0xcc9], dl
jne 0x407db5
xor cl, cl
jmp 0x407db7
mov cl, 1
cmp byte [eax + 0xcdd], 0
mov byte [eax + 0x161], cl
jne 0x407dd3
cmp byte [eax + 0xcf1], 0
jne 0x407dd3
xor cl, cl
jmp 0x407dd5
mov cl, 1
cmp byte [eax + 0xc8d], 0
mov byte [eax + 0x175], cl
jne 0x407df7
cmp byte [eax + 0xca1], 0
jne 0x407df7
xor cl, cl
mov byte [eax + 0x14d], cl
jmp 0x407e1d
mov cl, 1
mov byte [eax + 0x14d], cl
jmp 0x407e1d
cmp dword [0x4e9834], 0
jne 0x407e1d
mov cl, 1
call fcn.004158b0
mov byte [0x4e98d3], al
mov dl, 1
mov byte [0x4e98d6], al
mov eax, dword [edi]
test eax, eax
je 0x407e2d
cmp dword [eax], 7
mov byte [esp + 0x1a], 1
je 0x407e32
mov byte [esp + 0x1a], 0
test dl, dl
jne 0x407e3d
mov cl, 1
call fcn.004158b0
mov cl, byte [edi + 9]
mov eax, dword [esp + 0x134]
test cl, cl
je 0x4080d1
test al, al
jne 0x4080d1
mov eax, dword [0x4ea348]
test eax, eax
je 0x407e6e
cmp byte [edi + 0xa], 0
je 0x407e6e
cmp edi, eax
jne 0x4080ca
cmp cl, 1
jne 0x407f19
cmp byte [esp + 0x19], 0
mov ecx, dword [esp + 0x30]
jne 0x407e85
movzx ecx, bl
xor edx, edx
movzx eax, cx
cmp byte [esp + 0x19], dl
mov dword [esp + 0x44], ecx
cmovne edx, eax
movzx eax, cl
xor ecx, ecx
cmp byte [esp + 0x19], cl
push 0
cmovne eax, ecx
mov cl, al
call fcn.00415ac0
mov ch, al
xor edx, edx
xor eax, eax
mov byte [esp + 0x1f], ch
add esp, 4
mov dword [esp + 0x3c], edx
cmp ax, word [0x4ea378]
jae 0x407ffd
mov cl, byte [0x4e98bb]
nop
cmp byte [esp + 0x19], 0
mov eax, dword [0x4ea368]
mov ebp, dword [eax + edx*4]
je 0x407ee5
movzx eax, word [ebp + 0xa]
jmp 0x407ee9
movzx eax, byte [ebp + 0x11]
cmp dword [esp + 0x44], eax
je 0x407ef8
test byte [ebp + 0xe], ch
je 0x407fe5
cmp word [ebp + 6], 0
je 0x407f84
cmp byte [ebp + 0x19], 0
je 0x407fe5
test cl, cl
jne 0x407fe5
mov esi, dword [esp + 0x1c]
xor dl, dl
cmp edi, dword [0x4ea348]
je 0x407f2c
mov dword [0x4ea348], edi
mov byte [edi + 0x12], dl
cmp byte [edi + 0xa], 0
je 0x40804d
mov al, byte [edi + 8]
mov cl, byte [0x4e98d3]
test al, al
je 0x407f47
not al
and cl, al
test cl, cl
jne 0x407f59
test dl, dl
jne 0x407f59
test byte [edi + 0xc], 1
je 0x40804d
cmp esi, dword [0x4e9834]
jne 0x408004
cmp byte [esp + 0x19], 0
je 0x408004
mov eax, dword [0x4ec6b0]
movzx ecx, cl
shl ecx, 9
add ecx, dword [esp + 0x30]
jmp 0x408014
mov esi, dword [ebp + 0x20]
mov eax, esi
test eax, eax
je 0x407fe5
nop dword [eax]
cmp byte [eax + 0x1c], 0
jne 0x407fa0
mov eax, dword [eax + 8]
test eax, eax
jne 0x407f90
jmp 0x407fe5
cmp byte [esi + 0x1c], 0
je 0x407fd6
test cl, cl
je 0x407fb5
mov ecx, esi
call fcn.004915c0
test al, al
je 0x407fd0
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x407f15
mov edx, dword [ebp + 0x1c]
call fcn.0040c3a0
test eax, eax
jne 0x407f15
mov cl, byte [0x4e98bb]
mov esi, dword [esi + 8]
test esi, esi
jne 0x407fa0
mov edx, dword [esp + 0x3c]
mov ch, byte [esp + 0x1b]
movzx eax, word [0x4ea378]
inc edx
mov dword [esp + 0x3c], edx
cmp edx, eax
jl 0x407ed0
mov esi, dword [esp + 0x1c]
mov dl, 1
jmp 0x407f2c
movzx ecx, cl
movzx eax, bl
shl ecx, 8
add ecx, eax
mov eax, dword [0x4ec6ac]
movzx eax, word [eax + ecx*2]
movzx ebp, ax
mov dword [esp + 0x24], ebp
mov dword [esp + 0x2c], ebp
test ax, ax
jns 0x40802e
mov word [edi + 4], ax
jmp 0x40805b
and eax, 0x7fff
cmp ax, word [0x4ea378]
jae 0x408051
mov ecx, eax
mov eax, dword [0x4ec6b4]
mov ax, word [eax + ecx*2]
mov word [edi + 4], ax
jmp 0x408051
mov ebp, dword [esp + 0x24]
mov eax, 0x7fff
cmp bp, ax
jne 0x4080ca
test dl, dl
je 0x40806f
mov eax, dword [esp + 0x38]
mov ecx, 0x23
or byte [edi + 0xc], 8
mov word [eax], cx
cmp byte [edi + 8], 0
jne 0x4080ad
test byte [edi + 0xc], 1
jne 0x4080ad
cmp byte [esp + 0x1a], 0
jne 0x4080ad
test dl, dl
jne 0x4080ad
mov ebp, dword [esp + 0x138]
push 0
push SysReAllocString
push 0x7fff
push dword [esp + 0x20]
mov byte [edi + 0x11], 1
push ebp
push 0
push ecx
push ebx
mov ecx, esi
jmp 0x409114
mov ebp, dword [esp + 0x138]
push 0x7fff
push dword [esp + 0x18]
push ebp
push 0
push dword [esp + 0x30]
push ebx
jmp 0x407c55
mov eax, dword [esp + 0x134]
cmp byte [edi + 0xa], 0
mov byte [esp + 0x1b], 0
je 0x408167
test al, al
je 0x408167
mov ch, byte [esp + 0x12]
cmp dword [0x4ea348], edi
jne 0x408102
test ch, ch
je 0x408167
mov dword [0x4ea348], 0
cmp byte [edi + 0xb], 0
jne 0x408162
mov cl, byte [edi + 0xc]
test cl, 8
je 0x40811a
xor dl, dl
and cl, 0xf7
mov byte [edi + 0xc], cl
jmp 0x40811c
mov dl, 1
test ch, ch
je 0x408146
test dl, dl
je 0x408146
mov ebp, dword [esp + 0x138]
push 0
push SysReAllocString
push 0x7fff
push dword [esp + 0x20]
push ebp
push eax
push ecx
push ebx
mov ecx, esi
jmp 0x409114
mov ebp, dword [esp + 0x138]
push 0x7fff
push dword [esp + 0x18]
push ebp
push eax
push dword [esp + 0x30]
push ebx
jmp 0x407c55
mov byte [esp + 0x1b], 1
cmp byte [edi + 9], 0
je 0x4082f5
test al, al
je 0x4082f5
mov eax, dword [0x4ea348]
xor ecx, ecx
cmp eax, edi
cmove eax, ecx
mov dword [0x4ea348], eax
cmp byte [edi + 0xe], cl
je 0x4081a9
push 0xffc3d44d
push ecx
push ecx
mov byte [edi + 0xe], cl
mov dl, 0x12
push ecx
mov ecx, 1
call fcn.00413020
add esp, 0x10
cmp byte [edi + 0xf], 0
je 0x4081cd
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0x10
mov byte [edi + 0xf], 0
mov ecx, 1
call fcn.00413020
add esp, 0x10
mov edx, 0x7fff
cmp bp, dx
jne 0x408205
mov al, byte [edi + 0xc]
test al, 8
je 0x408205
and al, 0xf7
mov byte [edi + 0xc], al
mov ebp, dword [esp + 0x138]
push 0x7fff
push dword [esp + 0x18]
push ebp
push dword [esp + 0x140]
push dword [esp + 0x30]
push ebx
jmp 0x407c55
mov cl, byte [esp + 0x1a]
mov al, byte [edi + 0x12]
test cl, cl
je 0x40829f
cmp al, 2
jne 0x408273
mov ebp, dword [esp + 0x20]
mov dl, bl
push 0xffc3d44e
push 0
push 0
push ebp
mov ecx, 1
call fcn.00413020
push 0xffc3d44d
push 0
push 0
push ebp
mov dl, bl
mov ecx, 2
call fcn.00413020
add esp, 0x20
mov ebp, dword [esp + 0x138]
push 0
push SysReAllocString
push 0x7fff
push dword [esp + 0x20]
push ebp
push dword [esp + 0x148]
push ecx
push ebx
mov ecx, esi
jmp 0x409114
cmp al, 1
je 0x4081e3
cmp byte [edi + 0xa], 0
jne 0x4082e4
cmp byte [edi + 8], 0
jne 0x4081e3
test byte [edi + 0xc], 1
jne 0x4081e3
test cl, cl
jne 0x4081e3
jmp 0x40824b
test al, al
je 0x40827b
cmp bp, dx
jne 0x40827b
cmp byte [edi + 8], 0
jne 0x4081e3
test byte [edi + 0xc], 1
mov ebp, dword [esp + 0x138]
jne 0x4081ea
push 0
push SysReAllocString
push 0x7fff
push dword [esp + 0x20]
push ebp
push dword [esp + 0x148]
push ecx
push ebx
mov ecx, esi
jmp 0x409114
cmp byte [esp + 0x13], 0
jne 0x4082f5
cmp byte [edi + 0xb], 0
je 0x4081e3
cmp dword [0x4ea348], 0
mov edx, 0x7ffd
mov byte [esp + 0x12], 0
je 0x408700
mov ecx, dword [esp + 0x134]
test cl, cl
je 0x408321
cmp byte [edi + 0xb], 0
je 0x408700
mov eax, 0x7fff
cmp bp, ax
jne 0x408a10
movzx ebp, word [edi + 6]
xor esi, esi
cmp bp, ax
je 0x4084eb
nop
mov eax, dword [0x4ea368]
movzx ecx, bp
mov edx, dword [eax + ecx*4]
mov al, byte [edx + 0x11]
test al, al
jne 0x408390
cmp word [edx + 0xa], 0
je 0x4083ca
movzx ebp, word [edx + 0xc]
movzx eax, word [edx + 0xa]
lea ecx, [eax + eax*4]
mov eax, dword [0x4ec6bc]
lea eax, [eax + ecx*4]
cmp byte [eax + 0xd], 0
je 0x4083b8
cmp byte [edx + 0x16], 0
je 0x4083a9
cmp byte [esp + 0x134], 0
jne 0x4083c8
mov ax, word [edx + 4]
mov word [edi + 4], ax
test esi, esi
jne 0x4083d2
jmp 0x4083b8
movzx ebp, word [edx + 0xc]
test al, al
je 0x40835d
mov ecx, dword [0x4ec6b8]
movzx eax, al
lea eax, [eax + eax*4]
lea eax, [ecx + eax*4]
jmp 0x40836c
cmp byte [esp + 0x134], 0
jne 0x4083b8
test esi, esi
cmove esi, edx
mov eax, 0x7fff
cmp bp, ax
jne 0x408340
jmp 0x4083ca
mov esi, edx
test esi, esi
je 0x4084df
movzx ecx, byte [esi + 0x11]
cmp ecx, 0x12
ja case.0x4083e6.1
movzx eax, byte [ecx + 0x409144]
jmp dword [eax*4 + 0x409130]
mov ecx, dword [0x4ec6b8]
mov eax, 0xc80
mov edx, 0xc94
cmp byte [ecx + 0xca1], 0
cmovne eax, edx
add eax, ecx
jmp 0x408464
mov ecx, dword [0x4ec6b8]
mov eax, 0xca8
mov edx, 0xcbc
cmp byte [ecx + 0xcc9], 0
cmovne eax, edx
add eax, ecx
jmp 0x408464
mov ecx, dword [0x4ec6b8]
mov eax, 0xcd0
mov edx, 0xce4
cmp byte [ecx + 0xcf1], 0
cmovne eax, edx
add eax, ecx
jmp 0x408464
movzx eax, word [esi + 0xa]
lea ecx, [eax + eax*4]
mov eax, dword [0x4ec6bc]
lea eax, [eax + ecx*4]
jmp 0x408464
lea eax, [ecx + ecx*4]
mov ecx, dword [0x4ec6b8]
lea eax, [ecx + eax*4]
mov dword [0x4ea348], eax
movzx eax, word [esi + 6]
test ax, ax
je 0x408478
mov dword [esp + 0x2c], eax
jmp 0x4084cf
movzx eax, word [esi + 4]
lea ecx, [esp + 0x2c]
mov ebp, dword [esp + 0x138]
mov dl, byte [esp + 0x134]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x38]
push eax
lea eax, [esp + 0x16]
push eax
lea eax, [edi + 0xc]
push eax
push ebp
call fcn.0040cd70
add esp, 0x10
mov dword [esp + 0x34], eax
test eax, eax
jne 0x4084cb
push 0x7fff
push dword [esp + 0x18]
push ebp
push dword [esp + 0x140]
push dword [esp + 0x30]
jmp 0x407beb
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x24], eax
movzx ebp, ax
mov eax, dword [0x4ea348]
mov byte [eax + 0x12], 2
mov ecx, dword [esp + 0x134]
mov edx, 0x7ffd
mov eax, 0x7ffe
cmp bp, ax
je 0x4084fe
cmp bp, dx
jne 0x4086fc
test cl, cl
jne 0x408506
mov byte [edi + 0x10], 1
test byte [0x4e98d6], 0xc
jne 0x40852d
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0x12
xor ecx, ecx
call fcn.00413020
mov ecx, dword [esp + 0x144]
add esp, 0x10
cmp bl, 0xa2
je 0x408537
cmp bl, 0xa3
jne 0x40855a
mov esi, dword [esp + 0x20]
test cl, cl
jne 0x40855e
push 0xffc3d44d
push 0
push 0
push esi
mov dl, bl
mov ecx, 1
call fcn.00413020
add esp, 0x10
jmp 0x40855e
mov esi, dword [esp + 0x20]
mov eax, dword [0x4ea348]
mov byte [eax + 0xe], 1
mov eax, 0x7ffd
cmp bp, ax
jne 0x40859f
test byte [0x4e98d6], 0x30
jne 0x408591
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0x10
xor ecx, ecx
call fcn.00413020
add esp, 0x10
mov eax, dword [0x4ea348]
mov byte [eax + 0xf], 1
jmp 0x40861c
mov eax, 0x7ffe
cmp bp, ax
jne 0x40861c
cmp bl, 0xa0
je 0x4085b3
cmp bl, 0xa1
jne 0x4085d6
cmp byte [esp + 0x134], 0
jne 0x4085d6
push 0xffc3d44d
push 0
push 0
push esi
mov dl, bl
mov ecx, 1
call fcn.00413020
add esp, 0x10
test byte [0x4e98d6], 0x10
je 0x4085f9
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0xa0
mov ecx, 1
call fcn.00413020
add esp, 0x10
test byte [0x4e98d6], 0x20
je 0x40861c
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0xa1
mov ecx, 1
call fcn.00413020
add esp, 0x10
test byte [0x4e98d6], 1
je 0x40863f
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0xa2
mov ecx, 1
call fcn.00413020
add esp, 0x10
test byte [0x4e98d6], 2
je 0x408662
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0xa3
mov ecx, 1
call fcn.00413020
add esp, 0x10
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 9
mov ecx, 2
call fcn.00413020
mov eax, 0x7ffd
add esp, 0x10
cmp bp, ax
jne 0x4086c3
mov eax, dword [0x4ea348]
cmp byte [eax + 0xf], 0
je 0x4086c3
cmp bl, 0x60
jb 0x40869b
cmp bl, 0x69
jbe 0x4086a0
cmp bl, 0x6e
jne 0x4086c3
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0x10
mov ecx, 1
call fcn.00413020
mov eax, dword [0x4ea348]
add esp, 0x10
mov byte [eax + 0xf], 0
mov eax, dword [esp + 0x38]
mov ecx, 0x68
mov word [eax], cx
mov eax, dword [esp + 0x134]
test al, al
jne 0x4086de
mov byte [edi + 0x11], 1
mov ebp, dword [esp + 0x138]
push 0
push SysReAllocString
push 0x7fff
push dword [esp + 0x20]
push ebp
push eax
jmp 0x40910e
mov ebp, dword [esp + 0x24]
mov edx, 0x7fff
cmp bp, dx
jne 0x408b02
mov al, byte [edi + 8]
mov dl, byte [0x4e98d3]
test al, al
je 0x40871f
not al
and dl, al
mov eax, dword [esp + 0x1c]
mov dh, byte [esp + 0x19]
cmp eax, dword [0x4e9834]
jne 0x408747
test dh, dh
je 0x408747
mov eax, dword [0x4ec6b0]
movzx ecx, dl
shl ecx, 9
add ecx, dword [esp + 0x30]
movzx ebp, bl
jmp 0x408757
mov eax, dword [0x4ec6ac]
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 + 0x24], ecx
mov dword [esp + 0x2c], ecx
mov ecx, esi
cmp ax, word [esp + 0x48]
jne 0x40883d
cmp byte [0x4ec6aa], 0
je 0x40883d
cmp bl, 9
je 0x40883d
mov eax, dword [esp + 0x1c]
and dl, 0xf3
cmp eax, dword [0x4e9834]
jne 0x4087b0
test dh, dh
je 0x4087b0
mov eax, dword [0x4ec6b0]
movzx ecx, dl
shl ecx, 9
add ecx, dword [esp + 0x30]
jmp 0x4087bd
mov eax, dword [0x4ec6ac]
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 + 0x24], edx
mov dword [esp + 0x2c], edx
cmp ax, si
jbe 0x4087e8
mov ebp, 0x7fff
cmp ax, bp
jb 0x408846
mov ecx, dword [esp + 0x134]
mov ebp, dword [esp + 0x138]
mov edx, 0x7fff
test cl, cl
je 0x408ac0
cmp byte [edi + 8], 0
jne 0x408aac
test byte [edi + 0xc], 1
jne 0x408aac
cmp byte [edi + 9], 0
je 0x408aac
cmp byte [esp + 0x1a], 0
jne 0x408aac
push 0
push SysReAllocString
push 0x7fff
jmp 0x409108
mov edx, dword [esp + 0x24]
mov ebp, 0x7fff
movzx eax, cx
mov ecx, dword [esp + 0x134]
test ax, ax
jns 0x408938
test cl, cl
jne 0x4089f3
mov ah, byte [0x4e98d3]
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
cmove esi, ecx
cmp dx, bp
je 0x40890f
nop word [eax + eax]
mov eax, dword [0x4ea368]
movzx ecx, dx
mov ecx, dword [eax + ecx*4]
cmp byte [ecx + 0x15], 0
movzx edx, word [ecx + 0xc]
jne 0x4088da
movzx eax, byte [ecx + 0xf]
mov ebx, dword [esp + 0x12c]
not eax
test byte [0x4e98d3], al
jne 0x40890a
cmp byte [ecx + 0x16], 0
jne 0x40890a
cmp byte [ecx + 0x11], 0
jne 0x40890a
cmp word [ecx + 0xa], 0
jne 0x40890a
cmp word [ecx + 6], 0
jne 0x40890a
mov eax, esi
not eax
test dword [ecx], eax
jne 0x40890a
movzx eax, byte [0x4e98d3]
not eax
test byte [ecx + 0xe], al
je 0x408924
cmp dx, bp
jne 0x4088b0
mov eax, 0x7fff
movzx ecx, ax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x2c], ecx
jmp 0x4089ec
movzx eax, word [ecx + 4]
movzx ecx, ax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x2c], ecx
jmp 0x4089ec
cmp ax, bp
je 0x4087ef
and eax, 0x7fff
test cl, cl
je 0x4089d4
cmp ax, word [0x4ea378]
jae 0x4089c1
mov esi, eax
mov eax, dword [0x4ec6b4]
cmp word [eax + esi*2], bp
je 0x4089c1
cmp byte [esp + 0x1b], 0
mov ebp, dword [esp + 0x138]
jne 0x4089ae
push dword [esp + 0x38]
lea eax, [esp + 0x16]
mov dl, cl
push eax
lea eax, [edi + 0xc]
push eax
push ebp
lea ecx, [esp + 0x3c]
call fcn.0040cd70
add esp, 0x10
mov dword [esp + 0x34], eax
test eax, eax
je 0x4089a7
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x134]
jmp 0x4089fa
mov ecx, dword [esp + 0x134]
mov eax, dword [0x4ec6b4]
movzx eax, word [eax + esi*2]
mov dword [esp + 0x24], eax
mov dword [esp + 0x2c], eax
jmp 0x4089fe
cmp byte [esp + 0x1b], 0
mov ebp, dword [esp + 0x138]
je 0x4089fa
jmp 0x408803
cmp ax, word [0x4ea378]
jae 0x4089f3
mov ecx, eax
mov eax, dword [0x4ec6b4]
mov ax, word [eax + ecx*2]
mov word [edi + 4], ax
mov ecx, dword [esp + 0x134]
mov ebp, dword [esp + 0x138]
mov eax, dword [esp + 0x24]
mov edx, 0x7fff
cmp ax, dx
je 0x4087fb
mov ebp, dword [esp + 0x24]
mov al, byte [edi + 0xc]
lea esi, [edi + 0xc]
test al, 8
je 0x408a27
test cl, cl
je 0x408a27
and al, 0xf7
mov byte [esp + 0x12], 1
mov byte [esi], al
mov eax, ebp
mov ebp, dword [esp + 0x138]
and eax, 0x7fff
cmp ax, word [0x4ea378]
jae 0x408b73
cmp dword [esp + 0x34], 0
jne 0x408b73
push dword [esp + 0x38]
lea eax, [esp + 0x16]
mov dl, cl
push eax
push esi
push ebp
lea ecx, [esp + 0x3c]
call fcn.0040cd70
add esp, 0x10
mov dword [esp + 0x34], eax
test eax, eax
jne 0x408b6d
mov eax, dword [esp + 0x38]
cmp word [eax], 0x69
je 0x4084b1
mov eax, dword [esp + 0x134]
test al, al
je 0x408b22
cmp byte [edi + 0x11], 0
je 0x408b0e
push 0
push SysReAllocString
push 0x7fff
push dword [esp + 0x20]
push ebp
push eax
jmp 0x40910e
push 0x7fff
push dword [esp + 0x18]
push ebp
push ecx
push dword [esp + 0x30]
jmp 0x407beb
cmp word [edi + 4], dx
lea ecx, [edi + 4]
je 0x408aed
mov ebp, dword [esp + 0x138]
lea eax, [esp + 0x12]
push 0
push eax
lea eax, [edi + 0xc]
mov dl, 1
push eax
push ebp
call fcn.0040cd70
add esp, 0x10
cmp byte [esp + 0x12], 0
je 0x408b55
push 0x7fff
push dword [esp + 0x18]
push ebp
push 0
push dword [esp + 0x30]
jmp 0x407beb
mov ecx, dword [esp + 0x134]
jmp 0x408a10
push 0x7fff
push dword [esp + 0x18]
push ebp
push eax
push dword [esp + 0x30]
jmp 0x407beb
lea ecx, [edi + 4]
mov eax, 0x7fff
cmp word [ecx], ax
je 0x408aed
push 0
lea eax, [esp + 0x16]
mov byte [esp + 0x16], 0
push eax
push esi
push ebp
mov dl, 1
call fcn.0040cd70
add esp, 0x10
cmp byte [esp + 0x12], 0
jne 0x408aed
and byte [esi], 0xf7
mov byte [edi + 0x11], 1
push 0
push SysReAllocString
push 0x7fff
push dword [esp + 0x20]
push ebp
push 0
jmp 0x40910e
mov ecx, dword [esp + 0x2c]
jmp 0x408b77
mov ecx, dword [esp + 0x24]
and ecx, 0x7fff
test byte [0x4e98d6], 0xcc
mov dword [esp + 0x24], ecx
je 0x408c5a
cmp byte [esp + 0x12], 0
jne 0x408c5a
cmp byte [0x4ec6a9], 0
jne 0x408bb2
mov eax, dword [esp + 0x1c]
cmp eax, dword [0x4e9830]
jne 0x408c5a
test byte [0x4e98d6], 0xc0
mov dl, byte [0x4e98d2]
je 0x408bee
test dl, 0xc0
jne 0x408be1
cmp cx, word [0x4ea378]
jae 0x408bee
mov eax, dword [0x4ea368]
movzx ecx, cx
mov eax, dword [eax + ecx*4]
mov al, byte [eax + 0xf]
and al, 0xc0
je 0x408bea
mov byte [0x4ec6a8], 1
jmp 0x408c5a
mov ecx, dword [esp + 0x24]
cmp byte [0x4ec6a8], 0
jne 0x408c5a
mov al, byte [0x4e98d6]
test al, 0xc
je 0x408c5a
test al, 3
jne 0x408c5a
test dl, 0xc
jne 0x408c24
cmp cx, word [0x4ea378]
jae 0x408c5a
mov eax, dword [0x4ea368]
movzx ecx, cx
mov eax, dword [eax + ecx*4]
mov al, byte [eax + 0xf]
and al, 0xc
je 0x408c5a
cmp dword [0x4e9834], 0
je 0x408c36
mov byte [0x4ec6a8], 1
jmp 0x408c5a
movzx eax, word [0x4e82b8]
mov ecx, 2
mov dl, byte [0x4e8296]
push 0xffc3d44d
push 0
push 0
push eax
call fcn.00413020
add esp, 0x10
mov eax, dword [esp + 0x24]
movzx ecx, ax
lea eax, [ecx - 0x7ffa]
cmp eax, 4
ja case.default.0x408c70
jmp dword [eax*4 + 0x409158]
cmp byte [0x4ec6aa], 0
je 0x4084b1
xor al, al
test byte [0x4e98d6], 4
je 0x408c96
mov edx, 0xa4
jmp 0x408ca8
test byte [0x4e98d6], 8
movzx edx, al
mov eax, 0xa5
cmovne edx, eax
cmp byte [0x4ec6aa], 0
mov dword [esp + 0x3c], edx
je 0x408d35
mov eax, 0x7ffb
cmp word [esp + 0x24], ax
je case.0x408c70.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.00413020
add esp, 0x10
cmp byte [edi + 8], 0
je 0x408d24
cmp bl, 0x5b
je 0x408d24
cmp bl, 0x5c
je 0x408d24
cmp byte [esp + 0x134], 0
jne 0x408d24
push 0xffc3d44d
push 0
push 0
push 0
mov dl, bl
mov ecx, 1
call fcn.00413020
add esp, 0x10
mov byte [0x4ec6aa], 0
mov edx, 0x7fff
jmp 0x408fdc
cmp bl, 0xa4
je 0x408d44
mov byte [esp + 0x1b], 0
cmp bl, 0xa5
jne 0x408d49
mov byte [esp + 0x1b], 1
cmp bl, 0xa0
je 0x408d57
cmp bl, 0xa1
je 0x408d57
xor cl, cl
jmp 0x408d59
mov cl, 1
mov byte [esp + 0x19], cl
cmp bl, 0xa2
je 0x408d6c
mov byte [esp + 0x13], 0
cmp bl, 0xa3
jne 0x408d71
mov byte [esp + 0x13], 1
xor dl, dl
test byte [0x4e98d6], 0x10
mov dword [esp + 0x34], edx
je 0x408d84
mov dl, 0xa0
jmp 0x408da7
test byte [0x4e98d6], 0x20
mov eax, dword [esp + 0x134]
je 0x408d98
mov dl, 0xa1
jmp 0x408dae
test al, al
jne 0x408db2
test cl, cl
movzx edx, dl
movzx eax, bl
cmovne edx, eax
mov eax, dword [esp + 0x134]
mov dword [esp + 0x34], edx
xor cl, cl
test byte [0x4e98d6], 1
mov dword [esp + 0x30], ecx
je 0x408dc8
mov byte [esp + 0x30], 0xa2
jmp 0x408dee
test byte [0x4e98d6], 2
je 0x408dd8
mov byte [esp + 0x30], 0xa3
jmp 0x408dee
test al, al
jne 0x408dee
cmp byte [esp + 0x13], 0
movzx ecx, cl
movzx eax, bl
cmovne ecx, eax
mov dword [esp + 0x30], ecx
mov byte [esp + 0x13], 0
test dl, dl
je 0x408e14
push 0xffc3d44d
push 0
push 0
push 0
mov ecx, 1
call fcn.00413020
add esp, 0x10
mov byte [esp + 0x13], 1
mov eax, dword [esp + 0x30]
test al, al
je 0x408e36
push 0xffc3d44d
push 0
push 0
push 0
mov dl, al
mov ecx, 1
call fcn.00413020
add esp, 0x10
cmp byte [esp + 0x1b], 0
je 0x408e4b
cmp byte [esp + 0x134], 0
jne 0x408e53
mov al, bl
jmp 0x408e4f
mov eax, dword [esp + 0x3c]
test al, al
jne 0x408e6a
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0x12
xor ecx, ecx
call fcn.00413020
add esp, 0x10
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 9
mov ecx, 2
call fcn.00413020
add esp, 0x10
cmp byte [esp + 0x13], 0
je 0x408eab
cmp byte [esp + 0x19], 0
jne 0x408eab
mov dl, byte [esp + 0x34]
xor ecx, ecx
push 0xffc3d44d
push 0
push 0
push 0
call fcn.00413020
add esp, 0x10
mov byte [0x4ec6aa], 1
mov edx, 0x7fff
jmp 0x408fdc
cmp byte [0x4ec6aa], 0
je 0x4084b1
mov eax, dword [esp + 0x134]
test al, al
jne 0x408f09
cmp bl, 0xa2
je 0x408ee8
cmp bl, 0xa3
je 0x408ee8
cmp bl, 0xa0
je 0x408ee8
cmp bl, 0xa1
jne 0x408f09
push 0xffc3d44d
push 0
push 0
push 0
mov dl, bl
mov ecx, 1
call fcn.00413020
mov eax, dword [esp + 0x144]
add esp, 0x10
test byte [0x4e98d6], 0xc
je 0x408f20
test al, al
je 0x408f37
cmp bl, 0xa4
je 0x408f20
cmp bl, 0xa5
jne 0x408f37
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0x12
xor ecx, ecx
call fcn.00413020
add esp, 0x10
mov eax, 0x7ffd
cmp word [esp + 0x24], ax
jne 0x408f98
test byte [0x4e98d6], 0x30
jne 0x408f98
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0x10
xor ecx, ecx
call fcn.00413020
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 9
mov ecx, 2
call fcn.00413020
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0x10
mov ecx, 1
call fcn.00413020
add esp, 0x30
mov edx, 0x7fff
jmp 0x408fdc
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 9
mov ecx, 2
call fcn.00413020
add esp, 0x10
mov edx, 0x7fff
jmp 0x408fdc
mov edx, ecx
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x40], edx
mov eax, dword [ecx + 4]
test eax, eax
je 0x408fdc
cmp byte [eax], 5
jb 0x408fdc
movzx eax, word [ecx + 0x14]
shl eax, 0x10
or edx, eax
mov dword [esp + 0x40], edx
mov eax, dword [esp + 0x38]
mov ecx, 0x68
mov word [eax], cx
mov ecx, dword [esp + 0x134]
test cl, cl
je 0x409096
cmp byte [esp + 0x1a], 0
je 0x409054
cmp byte [edi + 9], 0
je 0x409054
mov esi, dword [esp + 0x20]
mov dl, bl
push 0xffc3d44e
push 0
push 0
push esi
mov ecx, 1
call fcn.00413020
push 0xffc3d44d
push 0
push 0
push esi
mov dl, bl
mov ecx, 2
call fcn.00413020
mov eax, dword [esp + 0x60]
add esp, 0x20
push 0
push SysReAllocString
push eax
push dword [esp + 0x20]
push ebp
push dword [esp + 0x148]
jmp 0x40910e
cmp byte [edi + 8], 0
je 0x40906d
cmp byte [edi + 0x11], 0
je 0x4090b7
push 0
push SysReAllocString
push edx
jmp 0x409108
cmp byte [esp + 0x12], 0
je 0x4090fc
mov eax, dword [esp + 0x1c]
push edx
push dword [esp + 0x18]
push ebp
push ecx
push dword [esp + 0x30]
mov ecx, eax
push ebx
push dword [esp + 0x140]
jmp 0x40795c
mov eax, dword [0x4ea348]
mov byte [edi + 0x10], 1
test eax, eax
je 0x4090ad
cmp byte [eax + 8], 0
je 0x4090ad
mov byte [eax + 0x12], 2
cmp byte [esp + 0x12], 0
je 0x4090c7
or byte [esi], 8
push edx
push dword [esp + 0x18]
push ebp
push ecx
push dword [esp + 0x30]
jmp 0x407beb
cmp bl, 0xa4
je 0x4090d1
cmp bl, 0xa5
jne 0x4090f4
push 0xffc3d450
push 0
push 0
push dword [esp + 0x2c]
mov dl, bl
mov ecx, 1
call fcn.00413020
mov ecx, dword [esp + 0x144]
add esp, 0x10
test cl, cl
jne 0x4090fc
mov byte [edi + 0x11], 1
mov eax, dword [esp + 0x40]
push 0
push SysReAllocString
push eax
push dword [esp + 0x20]
push ebp
push ecx
push ecx
push ebx
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x148]
call fcn.00409170
add esp, 0x20
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x110
ret