Function at 0x40e950
Capabilities:
Encrypt data using speck

Disassembly:
sub esp, 0x110
push ebx
push ebp
push esi
mov eax, 0x7fff
mov dword [esp + 0x20], edx
push edi
mov di, word [esp + 0x130]
mov esi, ecx
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x138]
mov dword [esp + 0x18], esi
movzx ebp, di
cmp eax, 0xffc3d44f
je 0x40e999
cmp eax, 0xffc3d44e
je 0x40e999
mov byte [esp + 0x1e], 0
cmp eax, 0xffc3d44d
jne 0x40e99e
mov byte [esp + 0x1e], 1
mov ecx, dword [0x507ac0]
mov ebx, dword [esp + 0x12c]
test ecx, ecx
jne 0x40e9bc
lea edx, [esp + 0x4c]
mov dword [esp + 0x14], edx
jmp 0x40ea7b
mov eax, dword [0x507b2c]
imul esi, eax, 0xd4
inc eax
add esi, ecx
xor ecx, ecx
cmp eax, dword [0x5049a0]
mov dword [esp + 0x14], esi
cmovge eax, ecx
mov dword [0x507b2c], 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 [0x507b28], eax
sub ecx, dword [0x50a79c]
mov dword [0x50a79c], eax
movd xmm0, ecx
cvtdq2pd xmm0, xmm0
shr ecx, 0x1f
addsd xmm0, qword [ecx*8 + 0x4fd680]
cvtpd2ps xmm0, xmm0
divss xmm0, dword [0x4fd5bc]
movss dword [esi + 8], xmm0
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov edx, dword [esp + 0x14]
mov esi, eax
lea ecx, [edx + 0xc]
test esi, esi
je 0x40ea62
cmp esi, dword [0x507b24]
je 0x40ea5b
push esi
push ecx
push 0x418
push dword [0x507aa8]
call dword [sym.imp.USER32.dll_PostMessageW]
mov edx, dword [esp + 0x14]
jmp 0x40ea71
xor eax, eax
mov word [ecx], ax
jmp 0x40ea71
mov eax, dword [0x4efea4]
mov dword [ecx], eax
mov eax, dword [0x4efea8]
mov dword [ecx + 4], eax
mov dword [0x507b24], esi
mov esi, dword [esp + 0x18]
cmp bl, 0xe7
jne 0x40eacd
mov ecx, dword [esp + 0x128]
push 0x7fff
push edx
push dword [esp + 0x13c]
mov ax, word [ecx + 4]
push 0
mov word [edx + 2], ax
mov eax, 0x55
push 0xe7
push ecx
mov word [edx + 4], ax
mov ecx, esi
push dword [esp + 0x13c]
mov edx, dword [esp + 0x40]
call fcn.004101f0
add esp, 0x1c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x110
ret
mov al, bl
mov word [edx + 2], di
add al, 0x64
mov cl, 3
cmp cl, al
sbb eax, eax
and eax, ebp
mov ebp, dword [0x50a950]
movzx eax, ax
mov dword [esp + 0x20], eax
cmp esi, dword [0x507ac4]
jne 0x40eb15
mov dl, byte [esp + 0x13c]
and dl, 1
jne 0x40eb75
mov al, byte [esp + 0x134]
movzx ecx, bl
xor al, 1
shl al, 7
mov byte [ecx + 0x508490], al
jmp 0x40eb75
mov ecx, dword [esp + 0x13c]
mov edx, ecx
movzx esi, bl
shr edx, 4
and edx, 0xffffff01
mov dword [esp + 0x30], edx
lea eax, [esi + esi*4]
cmp byte [ebp + eax*4 + 8], 0
jne 0x40eb71
push dword [esp + 0x134]
mov dl, bl
call fcn.004115b0
mov ecx, dword [esp + 0x138]
add esp, 4
mov ebp, dword [0x50a950]
mov edx, dword [esp + 0x30]
test al, al
je 0x40eb6b
mov al, cl
xor al, 1
shl al, 7
mov byte [esi + 0x508490], al
mov esi, dword [esp + 0x18]
jmp 0x40eb7c
mov esi, dword [esp + 0x18]
mov ecx, dword [esp + 0x134]
cmp byte [esp + 0x1e], 0
je 0x40eb8a
mov eax, 0x69
jmp 0x40eb9c
test dl, dl
mov eax, 0x20
mov edi, 0x61
cmovne eax, edi
movzx eax, ax
cmp byte [0x507b53], 0
mov edi, dword [esp + 0x14]
lea edx, [edi + 4]
mov word [edx], ax
mov dword [esp + 0x3c], edx
je 0x40ebd8
cmp bl, 0x5b
je 0x40ebbd
cmp bl, 0x5c
jne 0x40ebd8
test cl, cl
jne 0x40ebd8
push 0
push closesocket
push 0x7fff
push edi
push 0
push ecx
mov ecx, esi
jmp 0x410066
cmp byte [0x50a942], 0
mov esi, dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov edx, dword [sym.imp.USER32.dll_FindWindowW]
je 0x40ec88
cmp bl, 0x1b
jne 0x40ec88
test cl, cl
jne 0x40ec88
push 0
push str.32771
call edx
test eax, eax
je 0x40ec7c
push 0
push eax
call esi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp esi, eax
jne 0x40ec76
push 0xffc3d44d
push 0
push 0
push 0
mov dl, bl
xor ecx, ecx
call fcn.00419970
mov dl, byte [0x50848e]
mov ecx, 1
push 0xffc3d44d
shr dl, 3
push 0
and dl, 1
push 0
push 0
or dl, 0xa4
call fcn.00419970
add esp, 0x20
push 0
push closesocket
push 0x7fff
push edi
push 0
push ecx
mov ecx, dword [esp + 0x30]
push 0x1b
jmp 0x410067
mov esi, dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov ebp, dword [0x50a950]
mov edx, dword [sym.imp.USER32.dll_FindWindowW]
mov eax, dword [esp + 0x20]
movzx eax, ax
mov dword [esp + 0x30], eax
lea ecx, [eax + eax*4]
mov eax, dword [0x50a954]
lea edi, [eax + ecx*4]
mov eax, dword [esp + 0x18]
mov cl, byte [edi + 0x13]
mov byte [esp + 0x13], cl
cmp eax, dword [0x507ac8]
jne 0x40ecb5
test cl, cl
jne 0x40ecc8
movzx eax, bl
lea eax, [eax + eax*4]
lea edi, [eax*4]
mov eax, dword [esp + 0x18]
add edi, ebp
cmp byte [esp + 0x1e], 0
je 0x40ed39
cmp dword [esp + 0x138], 0xffc3d44e
mov eax, dword [esp + 0x134]
jne 0x40ed01
test al, al
je 0x40ed01
cmp dword [0x5085dc], edi
jne 0x40ed01
mov byte [edi + 0xd], 0
mov byte [edi + 0x10], 0
mov dword [0x5085dc], 0
push 0x7fff
push dword [esp + 0x18]
push eax
mov ecx, dword [esp + 0x24]
push dword [esp + 0x2c]
mov edx, dword [esp + 0x34]
push ebx
push dword [esp + 0x13c]
push dword [esp + 0x13c]
call fcn.004101f0
add esp, 0x1c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x110
ret
mov ecx, dword [esp + 0x134]
mov dword [esp + 0x48], 0x7fff
test cl, cl
jne 0x40ed5e
mov ebp, 0x7fff
mov byte [edi + 0x11], cl
mov word [edi + 4], bp
mov ebp, dword [0x50a950]
cmp eax, dword [0x507ac4]
jne 0x40eddb
test bl, bl
jne 0x40eda1
mov edx, dword [esp + 0x24]
push 0x7fff
push dword [esp + 0x18]
push ecx
push dword [esp + 0x2c]
mov ecx, eax
push 0
push dword [esp + 0x13c]
push dword [esp + 0x13c]
call fcn.004101f0
add esp, 0x1c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x110
ret
cmp bl, 1
je 0x40edab
cmp bl, 2
jne 0x40eddb
cmp dword [0x507a78], 0
jne 0x40ee09
push 0
push str.32768
call edx
test eax, eax
je 0x40edce
push 0
push eax
call esi
cmp eax, dword [0x50939c]
je 0x40ee02
mov ebp, dword [0x50a950]
mov ecx, dword [esp + 0x134]
mov eax, dword [0x5085dc]
mov esi, dword [esp + 0x18]
test eax, eax
je 0x40ee39
cmp eax, edi
je 0x40ee39
test cl, cl
jne 0x40ee39
cmp esi, dword [0x507ac8]
jne 0x40ee23
xor eax, eax
cmp byte [edi + 8], al
sete al
jmp 0x40ee2c
mov ecx, dword [esp + 0x134]
push 0x7fff
push dword [esp + 0x18]
mov al, cl
mov byte [edi + 0x10], 0
xor al, 1
mov byte [edi + 0xd], al
push ecx
jmp 0x40ed0b
mov eax, dword [0x5085dc]
movzx eax, byte [eax + 8]
test eax, eax
je 0x40ee39
mov eax, dword [0x5085dc]
mov byte [eax + 0x12], 1
cmp byte [edi + 9], 0
jne 0x40ee5d
cmp byte [edi + 0xa], 0
jne 0x40ee5d
push 0x7fff
push dword [esp + 0x18]
mov al, cl
xor al, 1
push ecx
mov byte [edi + 0xd], al
mov ecx, esi
jmp 0x40ed0f
mov dword [esp + 0x38], 0
mov edx, 0x7fff
mov dword [esp + 0x28], edx
mov dword [esp + 0x2c], edx
test cl, cl
je 0x40eea4
mov dl, byte [edi + 0x10]
mov dh, byte [edi + 0xd]
movzx eax, word [edi + 4]
mov byte [esp + 0x12], dh
mov byte [esp + 0x11], dl
mov edx, 0x7fff
mov byte [edi + 0x10], 0
cmp ax, dx
je 0x40eeb4
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov word [edi + 4], dx
jmp 0x40eeb4
mov al, byte [esp + 0x12]
mov byte [esp + 0x12], al
mov al, byte [esp + 0x12]
mov byte [esp + 0x11], al
mov al, cl
xor cl, cl
xor al, 1
mov byte [edi + 0xd], al
cmp esi, dword [0x507ac8]
jne 0x40ef2e
cmp byte [edi + 8], cl
je 0x40ef50
cmp byte [ebp + 0xcb5], cl
jne 0x40eee2
cmp byte [ebp + 0xcc9], cl
jne 0x40eee2
xor al, al
jmp 0x40eee4
mov al, 1
cmp byte [ebp + 0xcdd], 0
mov byte [ebp + 0x161], al
jne 0x40ef00
cmp byte [ebp + 0xcf1], 0
jne 0x40ef00
xor al, al
jmp 0x40ef02
mov al, 1
cmp byte [ebp + 0xc8d], 0
mov byte [ebp + 0x175], al
jne 0x40ef24
cmp byte [ebp + 0xca1], 0
jne 0x40ef24
xor al, al
mov byte [ebp + 0x14d], al
jmp 0x40ef50
mov al, 1
mov byte [ebp + 0x14d], al
jmp 0x40ef50
cmp dword [0x507ac8], 0
jne 0x40ef50
mov cl, 1
call fcn.0041bf40
mov ebp, dword [0x50a950]
mov cl, 1
mov byte [0x50848d], al
mov byte [0x50848e], al
mov eax, dword [edi]
test eax, eax
je 0x40ef60
cmp dword [eax], 7
mov byte [esp + 0x1e], 1
je 0x40ef65
mov byte [esp + 0x1e], 0
test cl, cl
jne 0x40ef76
mov cl, 1
call fcn.0041bf40
mov ebp, dword [0x50a950]
mov cl, byte [edi + 9]
mov eax, dword [esp + 0x134]
test cl, cl
je 0x40f206
test al, al
jne 0x40f206
mov eax, dword [0x5085dc]
test eax, eax
je 0x40efa7
cmp byte [edi + 0xa], 0
je 0x40efa7
cmp edi, eax
jne 0x40f1ff
cmp cl, 1
jne 0x40f060
cmp byte [esp + 0x13], 0
mov ecx, dword [esp + 0x30]
movzx eax, bl
cmove ecx, eax
xor edx, edx
cmp byte [esp + 0x13], dl
movzx eax, cx
cmovne edx, eax
mov dword [esp + 0x44], ecx
movzx eax, cl
xor ecx, ecx
cmp byte [esp + 0x13], cl
push 0
cmovne eax, ecx
mov cl, al
call fcn.0041c150
mov ch, al
xor edx, edx
xor eax, eax
mov byte [esp + 0x23], ch
add esp, 4
mov dword [esp + 0x34], edx
cmp ax, word [0x50860c]
jae 0x40f14a
mov cl, byte [0x507b20]
nop dword [eax + eax]
cmp byte [esp + 0x13], 0
mov eax, dword [0x5085fc]
mov ebp, dword [eax + edx*4]
je 0x40f025
movzx eax, word [ebp + 0xa]
jmp 0x40f029
movzx eax, byte [ebp + 0x11]
cmp dword [esp + 0x44], eax
je 0x40f038
test byte [ebp + 0xe], ch
je 0x40f12c
cmp word [ebp + 6], 0
je 0x40f0cb
mov al, byte [ebp + 0x19]
test al, al
je 0x40f12c
test cl, cl
jne 0x40f12c
mov ebp, dword [0x50a950]
mov esi, dword [esp + 0x18]
xor dl, dl
cmp edi, dword [0x5085dc]
je 0x40f073
mov dword [0x5085dc], edi
mov byte [edi + 0x12], dl
cmp byte [edi + 0xa], 0
je 0x40f198
mov al, byte [edi + 8]
mov cl, byte [0x50848d]
test al, al
je 0x40f08e
not al
and cl, al
test cl, cl
jne 0x40f0a0
test dl, dl
jne 0x40f0a0
test byte [edi + 0xc], 1
je 0x40f198
cmp esi, dword [0x507ac8]
jne 0x40f151
cmp byte [esp + 0x13], 0
je 0x40f151
mov eax, dword [0x50a948]
movzx ecx, cl
shl ecx, 9
add ecx, dword [esp + 0x30]
jmp 0x40f161
mov esi, dword [ebp + 0x20]
mov eax, esi
test eax, eax
je 0x40f12c
cmp byte [eax + 0x1c], 0
jne 0x40f0e3
mov eax, dword [eax + 8]
test eax, eax
jne 0x40f0d4
jmp 0x40f12c
test esi, esi
je 0x40f12c
cmp byte [esi + 0x1c], 0
je 0x40f11d
test cl, cl
je 0x40f0fc
mov ecx, esi
call fcn.0048ee30
test al, al
je 0x40f117
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x40f056
mov edx, dword [ebp + 0x1c]
call fcn.00413310
test eax, eax
jne 0x40f056
mov cl, byte [0x507b20]
mov esi, dword [esi + 8]
test esi, esi
jne 0x40f0e7
mov edx, dword [esp + 0x34]
mov ch, byte [esp + 0x1f]
movzx eax, word [0x50860c]
inc edx
mov dword [esp + 0x34], edx
cmp edx, eax
jl 0x40f010
mov ebp, dword [0x50a950]
mov esi, dword [esp + 0x18]
mov dl, 1
jmp 0x40f073
movzx ecx, cl
movzx eax, bl
shl ecx, 8
add ecx, eax
mov eax, dword [0x50a944]
movzx eax, word [eax + ecx*2]
movzx ecx, ax
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], ecx
test ax, ax
jns 0x40f17b
mov word [edi + 4], ax
jmp 0x40f1a4
and eax, 0x7fff
cmp ax, word [0x50860c]
jae 0x40f198
mov ecx, eax
mov eax, dword [0x50a94c]
mov ax, word [eax + ecx*2]
mov word [edi + 4], ax
mov eax, 0x7fff
cmp word [esp + 0x28], ax
jne 0x40f1ff
test dl, dl
je 0x40f1b8
mov eax, dword [esp + 0x3c]
mov ecx, 0x23
or byte [edi + 0xc], 8
mov word [eax], cx
cmp byte [edi + 8], 0
jne 0x40f1ed
test byte [edi + 0xc], 1
jne 0x40f1ed
cmp byte [esp + 0x1e], 0
jne 0x40f1ed
test dl, dl
jne 0x40f1ed
push 0
push closesocket
push 0x7fff
push dword [esp + 0x20]
mov byte [edi + 0x11], 1
push 0
push ecx
mov ecx, esi
jmp 0x410066
push 0x7fff
push dword [esp + 0x18]
mov ecx, esi
push 0
jmp 0x40ed0f
mov eax, dword [esp + 0x134]
cmp byte [edi + 0xa], 0
mov byte [esp + 0x1f], 0
je 0x40f280
test al, al
je 0x40f280
mov ch, byte [esp + 0x11]
cmp dword [0x5085dc], edi
jne 0x40f22f
test ch, ch
je 0x40f280
mov dword [0x5085dc], 0
cmp byte [edi + 0xb], 0
jne 0x40f27b
mov cl, byte [edi + 0xc]
test cl, 8
je 0x40f247
xor dl, dl
and cl, 0xf7
mov byte [edi + 0xc], cl
jmp 0x40f249
mov dl, 1
test ch, ch
je 0x40f26a
test dl, dl
je 0x40f26a
push 0
push closesocket
push 0x7fff
push dword [esp + 0x20]
push eax
push ecx
mov ecx, esi
jmp 0x410066
push 0x7fff
push dword [esp + 0x18]
mov ecx, esi
push eax
jmp 0x40ed0f
mov byte [esp + 0x1f], 1
cmp byte [edi + 9], 0
je 0x40f401
test al, al
je 0x40f401
mov eax, dword [0x5085dc]
xor ecx, ecx
cmp eax, edi
cmove eax, ecx
mov dword [0x5085dc], eax
cmp byte [edi + 0xe], cl
je 0x40f2c8
push 0xffc3d44d
push ecx
push ecx
mov byte [edi + 0xe], cl
mov dl, 0x12
push ecx
mov ecx, 1
call fcn.00419970
mov ebp, dword [0x50a950]
add esp, 0x10
cmp byte [edi + 0xf], 0
je 0x40f2f2
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0x10
mov byte [edi + 0xf], 0
mov ecx, 1
call fcn.00419970
mov ebp, dword [0x50a950]
add esp, 0x10
mov edx, dword [esp + 0x28]
mov eax, 0x7fff
cmp dx, ax
jne 0x40f323
mov al, byte [edi + 0xc]
test al, 8
je 0x40f323
and al, 0xf7
mov byte [edi + 0xc], al
push 0x7fff
push dword [esp + 0x18]
mov ecx, esi
push dword [esp + 0x13c]
jmp 0x40ed0f
mov cl, byte [esp + 0x1e]
mov al, byte [edi + 0x12]
test cl, cl
je 0x40f3ac
cmp al, 2
jne 0x40f384
mov ebp, dword [esp + 0x20]
mov dl, bl
push 0xffc3d44e
push 0
push 0
push ebp
mov ecx, 1
call fcn.00419970
push 0xffc3d44d
push 0
push 0
push ebp
mov dl, bl
mov ecx, 2
call fcn.00419970
add esp, 0x20
push 0
push closesocket
push 0x7fff
push dword [esp + 0x20]
push dword [esp + 0x144]
push ecx
mov ecx, esi
jmp 0x410066
cmp al, 1
je 0x40f30c
cmp byte [edi + 0xa], 0
jne 0x40f3dd
cmp byte [edi + 8], 0
jne 0x40f30c
test byte [edi + 0xc], 1
jne 0x40f30c
test cl, cl
jne 0x40f30c
jmp 0x40f365
test al, al
je 0x40f388
mov eax, 0x7fff
cmp dx, ax
jne 0x40f388
cmp byte [edi + 8], 0
jne 0x40f30c
test byte [edi + 0xc], 1
je 0x40f365
push eax
push dword [esp + 0x18]
mov ecx, esi
push dword [esp + 0x13c]
jmp 0x40ed0f
cmp byte [esp + 0x12], 0
jne 0x40f405
cmp byte [edi + 0xb], 0
jne 0x40f405
push 0x7fff
push dword [esp + 0x18]
mov ecx, esi
push dword [esp + 0x13c]
jmp 0x40ed0f
mov edx, dword [esp + 0x28]
cmp dword [0x5085dc], 0
mov byte [esp + 0x11], 0
je 0x40f7f8
mov ecx, dword [esp + 0x134]
test cl, cl
je 0x40f42c
cmp byte [edi + 0xb], 0
je 0x40f7f8
mov eax, 0x7fff
cmp dx, ax
jne 0x40fa4c
movzx eax, word [edi + 6]
mov edx, 0x7fff
xor esi, esi
mov dword [esp + 0x34], eax
cmp ax, dx
je 0x40f5e6
mov ecx, eax
mov eax, dword [0x5085fc]
movzx ecx, cx
mov edx, dword [eax + ecx*4]
mov al, byte [edx + 0x11]
test al, al
jne 0x40f46d
cmp word [edx + 0xa], 0
je 0x40f4e2
movzx ecx, word [edx + 0xc]
mov dword [esp + 0x34], ecx
test al, al
je 0x40f48a
movzx eax, al
lea eax, [eax + eax*4]
lea eax, [eax*4]
add eax, ebp
jmp 0x40f49d
movzx eax, word [edx + 0xa]
lea ecx, [eax + eax*4]
mov eax, dword [0x50a954]
lea eax, [eax + ecx*4]
mov ecx, dword [esp + 0x34]
cmp byte [eax + 0xd], 0
je 0x40f4d0
cmp byte [edx + 0x16], 0
je 0x40f4c1
cmp byte [esp + 0x134], 0
jne 0x40f4e0
mov ax, word [edx + 4]
mov word [edi + 4], ax
test esi, esi
jne 0x40f4ea
jmp 0x40f4d0
cmp byte [esp + 0x134], 0
jne 0x40f4d0
test esi, esi
cmove esi, edx
mov eax, 0x7fff
cmp cx, ax
jne 0x40f454
jmp 0x40f4e2
mov esi, edx
test esi, esi
je 0x40f5df
movzx ecx, byte [esi + 0x11]
cmp ecx, 0x12
ja case.0x40f4fa.1
movzx eax, byte [ecx + 0x410098]
jmp dword [eax*4 + 0x410084]
cmp byte [ebp + 0xca1], 0
mov eax, 0xc80
mov ecx, 0xc94
cmovne eax, ecx
jmp 0x40f55e
cmp byte [ebp + 0xcc9], 0
mov eax, 0xca8
mov ecx, 0xcbc
cmovne eax, ecx
jmp 0x40f55e
cmp byte [ebp + 0xcf1], 0
mov eax, 0xcd0
mov ecx, 0xce4
cmovne eax, ecx
jmp 0x40f55e
movzx eax, word [esi + 0xa]
lea ecx, [eax + eax*4]
mov eax, dword [0x50a954]
lea eax, [eax + ecx*4]
jmp 0x40f560
lea eax, [ecx + ecx*4]
lea eax, [eax*4]
add eax, ebp
mov dword [0x5085dc], eax
movzx eax, word [esi + 6]
test ax, ax
je 0x40f574
mov dword [esp + 0x2c], eax
jmp 0x40f5c6
movzx eax, word [esi + 4]
lea ecx, [esp + 0x2c]
mov dl, byte [esp + 0x134]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x3c]
push eax
lea eax, [esp + 0x15]
push eax
lea eax, [edi + 0xc]
push eax
mov eax, dword [esp + 0x144]
push eax
call fcn.00413de0
add esp, 0x10
mov dword [esp + 0x38], eax
test eax, eax
jne 0x40f5c2
push 0x7fff
push dword [esp + 0x18]
push dword [esp + 0x13c]
jmp 0x40ed0b
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x134]
mov dword [esp + 0x28], eax
movzx ebp, ax
mov eax, dword [0x5085dc]
mov byte [eax + 0x12], 2
jmp 0x40f5ea
mov ecx, dword [esp + 0x134]
mov ebp, dword [esp + 0x34]
mov eax, 0x7ffe
cmp bp, ax
je 0x40f602
mov eax, 0x7ffd
cmp bp, ax
jne 0x40f7f8
test cl, cl
jne 0x40f60a
mov byte [edi + 0x10], 1
test byte [0x50848e], 0xc
jne 0x40f631
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0x12
xor ecx, ecx
call fcn.00419970
mov ecx, dword [esp + 0x144]
add esp, 0x10
cmp bl, 0xa2
je 0x40f63b
cmp bl, 0xa3
jne 0x40f65e
mov esi, dword [esp + 0x20]
test cl, cl
jne 0x40f662
push 0xffc3d44d
push 0
push 0
push esi
mov dl, bl
mov ecx, 1
call fcn.00419970
add esp, 0x10
jmp 0x40f662
mov esi, dword [esp + 0x20]
mov eax, dword [0x5085dc]
mov byte [eax + 0xe], 1
mov eax, 0x7ffd
cmp bp, ax
jne 0x40f6a3
test byte [0x50848e], 0x30
jne 0x40f695
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0x10
xor ecx, ecx
call fcn.00419970
add esp, 0x10
mov eax, dword [0x5085dc]
mov byte [eax + 0xf], 1
jmp 0x40f720
mov eax, 0x7ffe
cmp bp, ax
jne 0x40f720
cmp bl, 0xa0
je 0x40f6b7
cmp bl, 0xa1
jne 0x40f6da
cmp byte [esp + 0x134], 0
jne 0x40f6da
push 0xffc3d44d
push 0
push 0
push esi
mov dl, bl
mov ecx, 1
call fcn.00419970
add esp, 0x10
test byte [0x50848e], 0x10
je 0x40f6fd
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0xa0
mov ecx, 1
call fcn.00419970
add esp, 0x10
test byte [0x50848e], 0x20
je 0x40f720
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0xa1
mov ecx, 1
call fcn.00419970
add esp, 0x10
test byte [0x50848e], 1
je 0x40f743
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0xa2
mov ecx, 1
call fcn.00419970
add esp, 0x10
test byte [0x50848e], 2
je 0x40f766
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0xa3
mov ecx, 1
call fcn.00419970
add esp, 0x10
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 9
mov ecx, 2
call fcn.00419970
mov eax, 0x7ffd
add esp, 0x10
cmp bp, ax
jne 0x40f7c7
mov eax, dword [0x5085dc]
cmp byte [eax + 0xf], 0
je 0x40f7c7
cmp bl, 0x60
jb 0x40f79f
cmp bl, 0x69
jbe 0x40f7a4
cmp bl, 0x6e
jne 0x40f7c7
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0x10
mov ecx, 1
call fcn.00419970
mov eax, dword [0x5085dc]
add esp, 0x10
mov byte [eax + 0xf], 0
mov eax, dword [esp + 0x3c]
mov ecx, 0x68
mov word [eax], cx
mov eax, dword [esp + 0x134]
test al, al
jne 0x40f7e2
mov byte [edi + 0x11], 1
push 0
push closesocket
push 0x7fff
push dword [esp + 0x20]
push eax
jmp 0x410061
mov ebp, dword [esp + 0x28]
mov edx, 0x7fff
cmp bp, dx
jne 0x40fa43
mov al, byte [edi + 8]
mov dl, byte [0x50848d]
test al, al
je 0x40f81b
not al
and dl, al
mov eax, dword [esp + 0x18]
mov dh, byte [esp + 0x13]
cmp eax, dword [0x507ac8]
jne 0x40f843
test dh, dh
je 0x40f843
mov eax, dword [0x50a948]
movzx ecx, dl
shl ecx, 9
add ecx, dword [esp + 0x30]
movzx ebp, bl
jmp 0x40f853
mov eax, dword [0x50a944]
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 + 0x2c], ecx
mov ecx, esi
cmp ax, word [esp + 0x48]
jne 0x40f8e9
cmp byte [0x50a942], 0
je 0x40f8e9
cmp bl, 9
je 0x40f8e9
mov eax, dword [esp + 0x18]
and dl, 0xf3
cmp eax, dword [0x507ac8]
jne 0x40f8a0
test dh, dh
je 0x40f8a0
mov eax, dword [0x50a948]
movzx ecx, dl
shl ecx, 9
add ecx, dword [esp + 0x30]
jmp 0x40f8ad
mov eax, dword [0x50a944]
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 + 0x2c], edx
cmp ax, si
jbe 0x40f8d8
mov ebp, 0x7fff
cmp ax, bp
jb 0x40f8ed
mov edx, 0x7fff
mov dword [esp + 0x28], edx
mov ecx, edx
mov dword [esp + 0x2c], edx
jmp 0x40f8ed
mov edx, dword [esp + 0x28]
movzx eax, cx
test ax, ax
jns 0x40f947
mov ecx, dword [esp + 0x134]
test cl, cl
jne 0x40f9f8
mov word [edi + 4], dx
lea ecx, [edi + 4]
mov eax, 0x7fff
cmp word [ecx], ax
je 0x40f937
push 0
lea eax, [esp + 0x15]
mov dl, 1
push eax
lea eax, [edi + 0xc]
push eax
push 0
call fcn.00413de0
add esp, 0x10
cmp byte [esp + 0x11], 0
je 0x40fb0f
push 0x7fff
push dword [esp + 0x18]
push 0
jmp 0x40ed0b
mov edx, 0x7fff
cmp ax, dx
je 0x40fa06
mov ecx, dword [esp + 0x134]
and eax, edx
test cl, cl
je 0x40f9d3
cmp ax, word [0x50860c]
jae 0x40f9ca
mov esi, eax
mov eax, dword [0x50a94c]
cmp word [eax + esi*2], dx
je 0x40f9ca
cmp byte [esp + 0x1f], 0
jne 0x40f9bb
push dword [esp + 0x3c]
lea eax, [esp + 0x15]
mov dl, cl
push eax
lea eax, [edi + 0xc]
push eax
push dword [esp + 0x144]
lea ecx, [esp + 0x3c]
call fcn.00413de0
mov ecx, dword [esp + 0x144]
add esp, 0x10
mov dword [esp + 0x38], eax
mov edx, 0x7fff
test eax, eax
je 0x40f9bb
mov ebp, dword [esp + 0x2c]
jmp 0x40fa01
mov eax, dword [0x50a94c]
movzx ebp, word [eax + esi*2]
mov dword [esp + 0x2c], ebp
jmp 0x40fa01
cmp byte [esp + 0x1f], 0
je 0x40f9fd
jmp 0x40fa06
mov ebp, dword [esp + 0x28]
cmp ax, word [0x50860c]
jae 0x40fa01
mov ecx, eax
mov eax, dword [0x50a94c]
mov ax, word [eax + ecx*2]
mov ecx, dword [esp + 0x134]
mov word [edi + 4], ax
jmp 0x40fa01
mov edx, 0x7fff
mov ebp, dword [esp + 0x28]
cmp bp, dx
jne 0x40fa50
mov eax, dword [esp + 0x134]
test al, al
je 0x40f908
cmp byte [edi + 8], 0
jne 0x40ed01
test byte [edi + 0xc], 1
jne 0x40ed01
cmp byte [edi + 9], 0
je 0x40ed01
cmp byte [esp + 0x1e], 0
jne 0x40ed01
jmp 0x40f7e2
mov ecx, dword [esp + 0x134]
jmp 0x40fa50
mov ebp, dword [esp + 0x28]
mov al, byte [edi + 0xc]
lea esi, [edi + 0xc]
test al, 8
je 0x40fa67
test cl, cl
je 0x40fa67
and al, 0xf7
mov byte [esp + 0x11], 1
mov byte [esi], al
mov eax, ebp
and eax, 0x7fff
cmp ax, word [0x50860c]
jae 0x40fb2a
cmp dword [esp + 0x38], 0
jne 0x40fb2a
mov ebp, dword [esp + 0x3c]
lea eax, [esp + 0x11]
push ebp
push eax
push esi
push dword [esp + 0x144]
mov dl, cl
lea ecx, [esp + 0x3c]
call fcn.00413de0
add esp, 0x10
mov dword [esp + 0x38], eax
test eax, eax
jne 0x40fb26
cmp word [ebp], 0x69
je 0x40f5ad
mov eax, dword [esp + 0x134]
test al, al
je 0x40fad3
cmp byte [edi + 0x11], 0
je 0x40ed01
jmp 0x40f7e2
lea ecx, [edi + 4]
mov eax, 0x7fff
cmp word [ecx], ax
je 0x40f937
push 0
lea eax, [esp + 0x15]
mov byte [esp + 0x15], 0
push eax
push esi
push 0
mov dl, 1
call fcn.00413de0
add esp, 0x10
cmp byte [esp + 0x11], 0
jne 0x40f937
and byte [esi], 0xf7
mov byte [edi + 0x11], 1
push 0
push closesocket
push 0x7fff
push dword [esp + 0x20]
push 0
jmp 0x410061
mov ebp, dword [esp + 0x2c]
and ebp, 0x7fff
test byte [0x50848e], 0xcc
je 0x40fbd0
cmp byte [esp + 0x11], 0
jne 0x40fbd0
cmp byte [0x50a941], 0
jne 0x40fb5d
mov eax, dword [esp + 0x18]
cmp eax, dword [0x507ac4]
jne 0x40fbd0
test byte [0x50848e], 0xc0
mov dh, byte [0x50848c]
je 0x40fb87
test dh, 0xc0
jne 0x40fb7e
mov dl, 0xc0
mov ecx, ebp
call fcn.00414030
test al, al
je 0x40fb87
mov byte [0x50a940], 1
jmp 0x40fbd0
cmp byte [0x50a940], 0
jne 0x40fbd0
mov al, byte [0x50848e]
test al, 0xc
je 0x40fbd0
test al, 3
jne 0x40fbd0
test dh, 0xc
jne 0x40fbaf
mov dl, 0xc
mov ecx, ebp
call fcn.00414030
test al, al
je 0x40fbd0
cmp dword [0x507ac8], 0
je 0x40fbc1
mov byte [0x50a940], 1
jmp 0x40fbd0
mov edx, 0xffc3d44d
mov ecx, 2
call fcn.00419f40
movzx ecx, bp
lea eax, [ecx - 0x7ffa]
cmp eax, 4
ja case.default.0x40fbe2
jmp dword [eax*4 + 0x4100ac]
cmp byte [0x50a942], 0
je 0x40f5ad
xor al, al
test byte [0x50848e], 4
je 0x40fc08
mov edx, 0xa4
jmp 0x40fc1a
test byte [0x50848e], 8
movzx edx, al
mov eax, 0xa5
cmovne edx, eax
cmp byte [0x50a942], 0
mov dword [esp + 0x34], edx
je 0x40fca1
mov eax, 0x7ffb
cmp bp, ax
je case.0x40fbe2.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.00419970
add esp, 0x10
cmp byte [edi + 8], 0
je 0x40fc90
cmp bl, 0x5b
je 0x40fc90
cmp bl, 0x5c
je 0x40fc90
cmp byte [esp + 0x134], 0
jne 0x40fc90
push 0xffc3d44d
push 0
push 0
push 0
mov dl, bl
mov ecx, 1
call fcn.00419970
add esp, 0x10
mov byte [0x50a942], 0
mov ebp, 0x7fff
jmp 0x40ff43
cmp bl, 0xa4
je 0x40fcb0
mov byte [esp + 0x1f], 0
cmp bl, 0xa5
jne 0x40fcb5
mov byte [esp + 0x1f], 1
cmp bl, 0xa0
je 0x40fcc3
cmp bl, 0xa1
je 0x40fcc3
xor cl, cl
jmp 0x40fcc5
mov cl, 1
mov byte [esp + 0x13], cl
cmp bl, 0xa2
je 0x40fcd8
mov byte [esp + 0x12], 0
cmp bl, 0xa3
jne 0x40fcdd
mov byte [esp + 0x12], 1
xor dl, dl
test byte [0x50848e], 0x10
mov dword [esp + 0x38], edx
je 0x40fcf3
mov edx, 0xa0
jmp 0x40fd16
test byte [0x50848e], 0x20
mov eax, dword [esp + 0x134]
je 0x40fd07
mov dl, 0xa1
jmp 0x40fd1d
test al, al
jne 0x40fd21
test cl, cl
movzx edx, dl
movzx eax, bl
cmovne edx, eax
mov eax, dword [esp + 0x134]
mov dword [esp + 0x38], edx
xor cl, cl
test byte [0x50848e], 1
mov dword [esp + 0x30], ecx
je 0x40fd37
mov byte [esp + 0x30], 0xa2
jmp 0x40fd5d
test byte [0x50848e], 2
je 0x40fd47
mov byte [esp + 0x30], 0xa3
jmp 0x40fd5d
test al, al
jne 0x40fd5d
cmp byte [esp + 0x12], 0
movzx ecx, cl
movzx eax, bl
cmovne ecx, eax
mov dword [esp + 0x30], ecx
mov byte [esp + 0x12], 0
test dl, dl
je 0x40fd83
push 0xffc3d44d
push 0
push 0
push 0
mov ecx, 1
call fcn.00419970
add esp, 0x10
mov byte [esp + 0x12], 1
mov eax, dword [esp + 0x30]
test al, al
je 0x40fda5
push 0xffc3d44d
push 0
push 0
push 0
mov dl, al
mov ecx, 1
call fcn.00419970
add esp, 0x10
cmp byte [esp + 0x1f], 0
je 0x40fdba
cmp byte [esp + 0x134], 0
jne 0x40fdc2
mov al, bl
jmp 0x40fdbe
mov eax, dword [esp + 0x34]
test al, al
jne 0x40fdd9
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0x12
xor ecx, ecx
call fcn.00419970
add esp, 0x10
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 9
mov ecx, 2
call fcn.00419970
add esp, 0x10
cmp byte [esp + 0x12], 0
je 0x40fe1a
cmp byte [esp + 0x13], 0
jne 0x40fe1a
mov dl, byte [esp + 0x38]
xor ecx, ecx
push 0xffc3d44d
push 0
push 0
push 0
call fcn.00419970
add esp, 0x10
mov byte [0x50a942], 1
mov ebp, 0x7fff
jmp 0x40ff43
cmp byte [0x50a942], 0
je 0x40f5ad
mov eax, dword [esp + 0x134]
test al, al
jne 0x40fe78
cmp bl, 0xa2
je 0x40fe57
cmp bl, 0xa3
je 0x40fe57
cmp bl, 0xa0
je 0x40fe57
cmp bl, 0xa1
jne 0x40fe78
push 0xffc3d44d
push 0
push 0
push 0
mov dl, bl
mov ecx, 1
call fcn.00419970
mov eax, dword [esp + 0x144]
add esp, 0x10
test byte [0x50848e], 0xc
je 0x40fe8f
test al, al
je 0x40fea6
cmp bl, 0xa4
je 0x40fe8f
cmp bl, 0xa5
jne 0x40fea6
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0x12
xor ecx, ecx
call fcn.00419970
add esp, 0x10
mov eax, 0x7ffd
mov byte [esp + 0x12], 0
cmp bp, ax
jne 0x40feda
test byte [0x50848e], 0x30
jne 0x40feda
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0x10
xor ecx, ecx
call fcn.00419970
add esp, 0x10
mov byte [esp + 0x12], 1
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 9
mov ecx, 2
call fcn.00419970
add esp, 0x10
cmp byte [esp + 0x12], 0
je 0x40fc97
push 0xffc3d44d
push 0
push 0
push 0
mov dl, 0x10
mov ecx, 1
call fcn.00419970
add esp, 0x10
mov ebp, 0x7fff
jmp 0x40ff43
mov ebp, ecx
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x40], ebp
mov eax, dword [ecx + 4]
test eax, eax
je 0x40ff43
cmp byte [eax], 5
jb 0x40ff43
movzx eax, word [ecx + 0x14]
shl eax, 0x10
or ebp, eax
mov dword [esp + 0x40], ebp
cmp byte [esp + 0x1e], 0
mov ecx, 0x68
mov eax, dword [esp + 0x3c]
mov word [eax], cx
mov ecx, dword [esp + 0x134]
je 0x40ffba
test cl, cl
je 0x40fff3
cmp byte [edi + 9], 0
je 0x40ffba
mov ebp, dword [esp + 0x20]
mov dl, bl
push 0xffc3d44e
push 0
push 0
push ebp
mov ecx, 1
call fcn.00419970
push 0xffc3d44d
push 0
push 0
push ebp
mov dl, bl
mov ecx, 2
call fcn.00419970
mov eax, dword [esp + 0x60]
add esp, 0x20
push 0
push closesocket
push eax
push dword [esp + 0x20]
push dword [esp + 0x144]
jmp 0x410061
test cl, cl
je 0x40fff3
cmp byte [edi + 8], 0
je 0x40ffcf
cmp byte [edi + 0x11], 0
je 0x410014
jmp 0x410054
cmp byte [esp + 0x11], 0
je 0x41004c
mov eax, dword [esp + 0x18]
push ebp
push dword [esp + 0x18]
push ecx
push dword [esp + 0x2c]
mov ecx, eax
push ebx
push dword [esp + 0x13c]
jmp 0x40eaaf
mov eax, dword [0x5085dc]
mov byte [edi + 0x10], 1
test eax, eax
je 0x41000a
cmp byte [eax + 8], 0
je 0x41000a
mov byte [eax + 0x12], 2
cmp byte [esp + 0x11], 0
je 0x41001f
or byte [esi], 8
push ebp
push dword [esp + 0x18]
push ecx
jmp 0x40ed0b
cmp bl, 0xa4
je 0x410029
cmp bl, 0xa5
jne 0x41004c
push 0xffc3d450
push 0
push 0
push dword [esp + 0x2c]
mov dl, bl
mov ecx, 1
call fcn.00419970
mov ecx, dword [esp + 0x144]
add esp, 0x10
test cl, cl
jne 0x410054
mov byte [edi + 0x11], 1
push 0
push closesocket
push ebp
push dword [esp + 0x20]
push ecx
push ecx
mov ecx, dword [esp + 0x30]
push ebx
mov edx, dword [esp + 0x144]
call fcn.004100c0
add esp, 0x1c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x110
ret