Function at 0x40aa60
Capabilities:
Encrypt data using speck

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x488826
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ebx
sub esp, 0x380
push esi
mov esi, dword [ebx + 0x10]
push edi
mov dword [ebp - 0x1c], edx
sub esp, 8
mov dword [ebp - 0x14], ecx
mov eax, dword [esi]
mov edi, dword [eax + 0x70]
mov edx, dword [eax + 0xb8]
mov eax, esp
mov dword [eax], ecx
mov ecx, dword [ebp - 0x1c]
mov word [eax + 4], cx
mov ecx, esi
call edx
push eax
mov ecx, esi
call edi
test al, al
je 0x40ab86
mov edi, dword [ebp - 0x14]
xor ecx, ecx
mov dword [ebp - 0x2c], ecx
cmp dword [esi + 0x3b1], ecx
jbe 0x40ab66
nop dword [eax + eax]
mov eax, dword [esi + 0x3ad]
sub esp, 8
mov ecx, dword [eax + ecx*4]
mov eax, esp
mov edx, dword [ecx]
mov dword [eax], edi
mov edi, dword [ebp - 0x1c]
mov word [eax + 4], di
mov edi, dword [ebx + 0xc]
lea eax, [edi*8]
push eax
push dword [ebx + 8]
call dword [edx + 0x20]
mov ecx, dword [ebp - 0x2c]
mov eax, dword [esi + 0x3b1]
inc ecx
mov edi, dword [ebp - 0x14]
mov dword [ebp - 0x2c], ecx
cmp ecx, eax
jb 0x40aae0
xor ecx, ecx
mov word [ebp - 0x24], 0x24
mov dword [ebp - 0x2c], ecx
test eax, eax
je 0x40ab6c
nop dword [eax]
mov eax, dword [esi + 0x3ad]
sub esp, 8
mov esi, dword [ebp - 0x1c]
mov ecx, dword [eax + ecx*4]
mov eax, esp
push 0x10
mov edx, dword [ecx]
mov dword [eax], edi
mov word [eax + 4], si
lea eax, [ebp - 0x24]
push eax
call dword [edx + 0x1c]
mov ecx, dword [ebp - 0x2c]
mov esi, dword [ebx + 0x10]
inc ecx
mov dword [ebp - 0x2c], ecx
cmp ecx, dword [esi + 0x3b1]
jb 0x40ab30
jmp 0x40ab6c
mov word [ebp - 0x24], 0x24
push dword [ebp - 0x1c]
lea eax, [ebp - 0x24]
push edi
push 2
push eax
push dword [esi + 0x816]
call fcn.004191a0
jmp 0x40b97f
mov edx, dword [ebx + 8]
cmp byte [edx], 0x24
mov edx, dword [ebx + 0xc]
jne 0x40aceb
cmp edx, 2
ja 0x40aceb
mov eax, dword [esi + 0x3b9]
cmp eax, dword [esi + 0x3c5]
je 0x40aceb
cmp byte [eax + 0x116], 0
je 0x40aceb
mov ecx, dword [esi + 0x3b9]
mov eax, dword [ecx + 0x117]
mov dword [esi + 0x3b9], eax
xor al, al
mov byte [ebp - 0x15], al
test ecx, ecx
je 0x40aceb
mov edx, ecx
nop
cmp dword [ecx + 0x112], 1
mov edi, dword [ebp - 0x14]
jne 0x40ac68
cmp dword [ecx], edi
jne 0x40ac68
mov eax, dword [ebp - 0x1c]
cmp word [ecx + 4], ax
jne 0x40ac68
mov byte [ebp - 0x15], 1
cmp ecx, edx
jne 0x40ac59
mov eax, dword [esi + 0x3c1]
inc dword [esi + 0x3c9]
mov byte [eax + 0x116], 0
mov eax, dword [esi + 0x3c1]
mov eax, dword [eax + 0x117]
mov dword [esi + 0x3c1], eax
mov eax, dword [esi + 0x3b9]
cmp eax, dword [esi + 0x3c5]
je 0x40ac53
cmp byte [eax + 0x116], 0
je 0x40ac53
mov edx, dword [esi + 0x3b9]
mov ecx, edx
mov eax, dword [edx + 0x117]
mov dword [esi + 0x3b9], eax
jmp 0x40ac91
xor edx, edx
mov ecx, edx
jmp 0x40ac91
mov eax, 0xffff
mov dword [ecx], 0xffffffff
mov word [ecx + 4], ax
mov eax, dword [esi + 0x3b9]
cmp eax, dword [esi + 0x3c5]
je 0x40ac99
cmp byte [eax + 0x116], 0
je 0x40ac99
mov ecx, dword [esi + 0x3b9]
mov eax, dword [ecx + 0x117]
mov dword [esi + 0x3b9], eax
test ecx, ecx
jne 0x40abe0
test edx, edx
je 0x40aca3
mov dword [esi + 0x3b9], edx
cmp byte [ebp - 0x15], 0
je 0x40ace8
push 0x16
call fcn.004684fa
add esp, 4
lea ecx, [eax + 0x15]
mov dword [eax + 8], 1
mov dword [eax + 0x10], ecx
mov byte [eax + 0x14], 0
mov byte [ecx], 0x24
mov ecx, dword [ebp - 0x1c]
mov word [eax + 6], cx
mov ecx, 0xffff
mov word [eax], cx
mov ecx, esi
push eax
mov dword [eax + 0xc], 8
mov dword [eax + 2], edi
call fcn.0040a9d0
mov edx, dword [ebx + 0xc]
mov eax, dword [ebx + 8]
mov al, byte [eax]
cmp al, 0x1f
jne 0x40af2a
cmp edx, 2
ja 0x40ae5c
mov eax, dword [esi + 0x3b9]
cmp eax, dword [esi + 0x3c5]
je 0x40ae5c
cmp byte [eax + 0x116], 0
je 0x40ae5c
mov ecx, dword [esi + 0x3b9]
mov eax, dword [ecx + 0x117]
mov dword [esi + 0x3b9], eax
xor al, al
mov byte [ebp - 0x15], al
test ecx, ecx
je 0x40ae5c
mov edx, ecx
nop dword [eax]
nop word [eax + eax]
cmp dword [ecx + 0x112], 1
mov edi, dword [ebp - 0x14]
jne 0x40addc
cmp dword [ecx], edi
jne 0x40addc
mov eax, dword [ebp - 0x1c]
cmp word [ecx + 4], ax
jne 0x40addc
mov byte [ebp - 0x15], 1
cmp ecx, edx
jne 0x40adcd
mov eax, dword [esi + 0x3c1]
inc dword [esi + 0x3c9]
mov byte [eax + 0x116], 0
mov eax, dword [esi + 0x3c1]
mov eax, dword [eax + 0x117]
mov dword [esi + 0x3c1], eax
mov eax, dword [esi + 0x3b9]
cmp eax, dword [esi + 0x3c5]
je 0x40adc7
cmp byte [eax + 0x116], 0
je 0x40adc7
mov edx, dword [esi + 0x3b9]
mov ecx, edx
mov eax, dword [edx + 0x117]
mov dword [esi + 0x3b9], eax
jmp 0x40ae05
xor edx, edx
mov ecx, edx
jmp 0x40ae05
mov eax, 0xffff
mov dword [ecx], 0xffffffff
mov word [ecx + 4], ax
mov eax, dword [esi + 0x3b9]
cmp eax, dword [esi + 0x3c5]
je 0x40ae0d
cmp byte [eax + 0x116], 0
je 0x40ae0d
mov ecx, dword [esi + 0x3b9]
mov eax, dword [ecx + 0x117]
mov dword [esi + 0x3b9], eax
test ecx, ecx
jne 0x40ad50
test edx, edx
je 0x40ae17
mov dword [esi + 0x3b9], edx
cmp byte [ebp - 0x15], 0
je 0x40ae5c
push 0x16
call fcn.004684fa
add esp, 4
lea ecx, [eax + 0x15]
mov dword [eax + 8], 1
mov dword [eax + 0x10], ecx
mov byte [eax + 0x14], 0
mov byte [ecx], 0x1f
mov ecx, dword [ebp - 0x1c]
mov dword [eax + 0xc], 8
mov dword [eax + 2], edi
mov word [eax + 6], cx
mov ecx, 0xffff
mov word [eax], cx
mov ecx, esi
push eax
call fcn.0040a9d0
mov edi, dword [ebp - 0x14]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x48], edi
mov word [ebp - 0x44], ax
cmp edi, 0xffffffff
jne 0x40ae7c
mov ecx, 0xffff
cmp ax, cx
je 0x40b640
lea ecx, [ebp - 0x23]
push ecx
lea ecx, [ebp - 0x48]
push ecx
lea ecx, [esi + 0x338]
call fcn.0040d440
cmp byte [ebp - 0x23], 0
je 0x40b640
lea ecx, [eax + eax*4]
mov eax, dword [esi + 0x338]
imul ecx, dword [eax + ecx*2 + 6], 0x7f2
add ecx, dword [esi + 0x334]
mov dword [ebp - 0x34], ecx
je 0x40b640
cmp dword [ecx + 0x7ee], 7
jne 0x40aeda
test dword [ebx + 0xc], 0x80000007
jne 0x40aeda
lea eax, [ecx + 0x7d1]
add ecx, 0xd
push eax
call fcn.00411830
push dword [esi + 0x80d]
mov ecx, dword [ebp - 0x1c]
lea eax, [esi + 0x3ad]
push eax
sub esp, 8
mov eax, esp
mov dword [eax], edi
mov edi, dword [ebx + 0xc]
mov word [eax + 4], cx
mov ecx, dword [ebp - 0x34]
push edi
push dword [ebx + 8]
add ecx, 0xd
call fcn.00411ff0
test al, al
jne 0x40b97f
mov eax, dword [ebx + 8]
mov al, byte [eax]
cmp al, 0x18
jne 0x40b5d6
cmp edi, 3
jle 0x40b97f
jmp 0x40b622
cmp al, 0x19
jne 0x40b224
cmp edx, 2
ja 0x40ae5c
xor ecx, ecx
mov dword [ebp - 0x2c], ecx
cmp dword [esi + 0x3b1], ecx
jbe 0x40af8e
mov edi, dword [ebp - 0x14]
nop dword [eax + eax]
mov eax, dword [esi + 0x3ad]
sub esp, 8
mov esi, dword [ebp - 0x1c]
mov ecx, dword [eax + ecx*4]
mov eax, dword [ecx]
mov edx, dword [eax + 0x20]
mov eax, esp
mov dword [eax], edi
mov word [eax + 4], si
mov esi, dword [ebx + 0xc]
lea eax, [esi*8]
push eax
push dword [ebx + 8]
call edx
mov ecx, dword [ebp - 0x2c]
mov esi, dword [ebx + 0x10]
inc ecx
mov dword [ebp - 0x2c], ecx
cmp ecx, dword [esi + 0x3b1]
jb 0x40af50
mov eax, dword [esi + 0x3b9]
cmp eax, dword [esi + 0x3c5]
je 0x40b97f
cmp byte [eax + 0x116], 0
je 0x40b97f
mov edi, dword [esi + 0x3b9]
mov eax, dword [edi + 0x117]
mov dword [esi + 0x3b9], eax
test edi, edi
je 0x40b97f
mov ecx, edi
mov dword [ebp - 0x2c], ecx
nop dword [eax]
mov edx, dword [ebp - 0x14]
cmp dword [edi], edx
jne 0x40b1e0
mov eax, dword [ebp - 0x1c]
cmp word [edi + 4], ax
jne 0x40b1e0
mov ecx, dword [ebp - 0x1c]
push 1
push 1
sub esp, 8
mov eax, esp
mov dword [eax], edx
mov word [eax + 4], cx
mov ecx, esi
call fcn.00408c90
mov dword [ebp - 0x20], eax
test eax, eax
jne 0x40b02b
mov ecx, dword [ebp - 0x14]
sub esp, 0xc
mov eax, esp
mov dword [eax], ecx
mov ecx, dword [ebp - 0x1c]
mov word [eax + 4], cx
mov ecx, esi
call fcn.00409430
mov dword [ebp - 0x20], eax
test eax, eax
je 0x40b16c
call fcn.00403150
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x3c], edx
mov dword [ebp - 0x278], 0
mov dword [ebp - 0x274], 0x800
mov dword [eax + 0x7ee], 4
mov byte [eax + 0x68f], 1
lea eax, [ebp - 0x267]
mov dword [ebp - 0x270], 0
mov dword [ebp - 0x26c], eax
mov byte [ebp - 0x268], 1
push 1
push 8
lea eax, [ebp - 0x30]
mov dword [ebp - 4], 0
push eax
lea ecx, [ebp - 0x278]
mov byte [ebp - 0x30], 0xb
call fcn.00402210
mov al, byte [edi + 0x111]
test al, al
je 0x40b10e
movzx eax, al
lea edx, [edi + 0x11]
mov dword [ebp - 0x20], eax
test eax, eax
je 0x40b10e
test byte [ebp - 0x278], 7
lea ecx, [eax*8]
mov dword [ebp - 0x40], ecx
jne 0x40b0ff
shl eax, 3
lea ecx, [ebp - 0x278]
push eax
call fcn.004024e0
push dword [ebp - 0x20]
lea eax, [edi + 0x11]
push eax
mov eax, dword [ebp - 0x278]
add eax, 7
sar eax, 3
add eax, dword [ebp - 0x26c]
push eax
call fcn.00462e50
mov eax, dword [ebp - 0x40]
add esp, 0xc
add dword [ebp - 0x278], eax
jmp 0x40b10e
push 1
push ecx
push edx
lea ecx, [ebp - 0x278]
call fcn.00402210
push dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x14]
push dword [ebp - 0x34]
push 0
push 0
sub esp, 8
mov eax, esp
push 0
push 8
push 0
push dword [ebp - 0x278]
mov dword [eax], ecx
mov ecx, dword [ebp - 0x1c]
push dword [ebp - 0x26c]
mov word [eax + 4], cx
mov ecx, esi
call fcn.0040a520
mov dword [ebp - 4], 0xffffffff
cmp byte [ebp - 0x268], 0
je 0x40b16c
cmp dword [ebp - 0x274], 0x800
jle 0x40b16c
push dword [ebp - 0x26c]
call fcn.004684df
add esp, 4
mov ecx, dword [ebp - 0x2c]
cmp edi, ecx
jne 0x40b1d1
mov eax, dword [esi + 0x3c1]
inc dword [esi + 0x3c9]
mov byte [eax + 0x116], 0
mov eax, dword [esi + 0x3c1]
mov eax, dword [eax + 0x117]
mov dword [esi + 0x3c1], eax
mov eax, dword [esi + 0x3b9]
cmp eax, dword [esi + 0x3c5]
je 0x40b1c8
cmp byte [eax + 0x116], 0
je 0x40b1c8
mov ecx, dword [esi + 0x3b9]
mov edi, ecx
mov dword [ebp - 0x2c], ecx
mov eax, dword [ecx + 0x117]
mov dword [esi + 0x3b9], eax
jmp 0x40b209
xor ecx, ecx
mov dword [ebp - 0x2c], ecx
mov edi, ecx
jmp 0x40b209
mov eax, 0xffff
mov dword [edi], 0xffffffff
mov word [edi + 4], ax
mov eax, dword [esi + 0x3b9]
cmp eax, dword [esi + 0x3c5]
je 0x40b211
cmp byte [eax + 0x116], 0
je 0x40b211
mov edi, dword [esi + 0x3b9]
mov eax, dword [edi + 0x117]
mov dword [esi + 0x3b9], eax
test edi, edi
jne 0x40afd0
test ecx, ecx
je 0x40b97f
mov dword [esi + 0x3b9], ecx
jmp 0x40b97f
cmp al, 0x1d
jne 0x40b362
cmp edx, 2
ja 0x40ae5c
mov eax, dword [esi + 0x3b9]
cmp eax, dword [esi + 0x3c5]
je 0x40ae5c
cmp byte [eax + 0x116], 0
je 0x40ae5c
mov ecx, dword [esi + 0x3b9]
mov eax, dword [ecx + 0x117]
mov dword [esi + 0x3b9], eax
xor al, al
mov byte [ebp - 0x15], al
test ecx, ecx
je 0x40ae5c
mov edx, ecx
nop word [eax + eax]
cmp dword [ecx + 0x112], 1
mov edi, dword [ebp - 0x14]
jne 0x40b308
cmp dword [ecx], edi
jne 0x40b308
mov eax, dword [ebp - 0x1c]
cmp word [ecx + 4], ax
jne 0x40b308
mov byte [ebp - 0x15], 1
cmp ecx, edx
jne 0x40b2f9
mov eax, dword [esi + 0x3c1]
inc dword [esi + 0x3c9]
mov byte [eax + 0x116], 0
mov eax, dword [esi + 0x3c1]
mov eax, dword [eax + 0x117]
mov dword [esi + 0x3c1], eax
mov eax, dword [esi + 0x3b9]
cmp eax, dword [esi + 0x3c5]
je 0x40b2f3
cmp byte [eax + 0x116], 0
je 0x40b2f3
mov edx, dword [esi + 0x3b9]
mov ecx, edx
mov eax, dword [edx + 0x117]
mov dword [esi + 0x3b9], eax
jmp 0x40b331
xor edx, edx
mov ecx, edx
jmp 0x40b331
mov eax, 0xffff
mov dword [ecx], 0xffffffff
mov word [ecx + 4], ax
mov eax, dword [esi + 0x3b9]
cmp eax, dword [esi + 0x3c5]
je 0x40b339
cmp byte [eax + 0x116], 0
je 0x40b339
mov ecx, dword [esi + 0x3b9]
mov eax, dword [ecx + 0x117]
mov dword [esi + 0x3b9], eax
test ecx, ecx
jne 0x40b280
test edx, edx
je 0x40b343
mov dword [esi + 0x3b9], edx
cmp byte [ebp - 0x15], 0
je 0x40ae5c
mov ecx, 1
call fcn.004051e0
mov ecx, dword [eax + 0x10]
mov byte [ecx], 0x1d
jmp 0x40ae3b
cmp al, 0x18
jne 0x40b4f1
mov edi, dword [ebp - 0x14]
cmp edx, 3
jne 0x40ae5f
xor ecx, ecx
mov dword [ebp - 0x20], ecx
cmp dword [esi + 0x3b1], ecx
jbe 0x40b3b8
mov eax, dword [esi + 0x3ad]
sub esp, 8
mov ecx, dword [eax + ecx*4]
mov eax, dword [ecx]
mov edx, dword [eax + 0x20]
mov eax, esp
push 0x18
push dword [ebx + 8]
mov dword [eax], edi
mov edi, dword [ebp - 0x1c]
mov word [eax + 4], di
call edx
mov ecx, dword [ebp - 0x20]
mov edi, dword [ebp - 0x14]
inc ecx
mov dword [ebp - 0x20], ecx
cmp ecx, dword [esi + 0x3b1]
jb 0x40b383
mov ecx, dword [ebp - 0x1c]
push 1
push 1
sub esp, 8
mov eax, esp
mov dword [eax], edi
mov word [eax + 4], cx
mov ecx, esi
call fcn.00408c90
mov ecx, eax
test ecx, ecx
je 0x40b464
cmp byte [ecx + 0x68f], 1
je 0x40b460
mov eax, dword [ecx + 0x7ee]
cmp eax, 8
je 0x40b3fd
cmp eax, 1
je 0x40b3fd
cmp eax, 2
jne 0x40ae5f
xor ecx, ecx
mov word [ebp - 0x28], 0x1d
mov dword [ebp - 0x20], ecx
cmp dword [esi + 0x3b1], ecx
je 0x40b446
mov eax, dword [esi + 0x3ad]
sub esp, 8
mov esi, dword [ebp - 0x1c]
mov ecx, dword [eax + ecx*4]
mov eax, dword [ecx]
mov edx, dword [eax + 0x1c]
mov eax, esp
push 0x10
mov dword [eax], edi
mov word [eax + 4], si
lea eax, [ebp - 0x28]
push eax
call edx
mov ecx, dword [ebp - 0x20]
mov esi, dword [ebx + 0x10]
inc ecx
mov dword [ebp - 0x20], ecx
cmp ecx, dword [esi + 0x3b1]
jb 0x40b410
push dword [ebp - 0x1c]
lea eax, [ebp - 0x28]
push edi
push 2
push eax
push dword [esi + 0x816]
call fcn.004191a0
jmp 0x40ae5f
test ecx, ecx
jne 0x40b47b
mov ecx, dword [ebp - 0x1c]
sub esp, 0xc
mov eax, esp
mov dword [eax], edi
mov word [eax + 4], cx
mov ecx, esi
call fcn.00409430
mov ecx, eax
mov edx, dword [esi + 0x3b1]
test ecx, ecx
mov eax, 0x1f
mov dword [ebp - 0x34], 0x19
cmovne eax, dword [ebp - 0x34]
xor ecx, ecx
mov byte [ebp - 0x28], al
mov byte [ebp - 0x27], 0
mov dword [ebp - 0x20], ecx
test edx, edx
je 0x40b4d7
mov eax, dword [esi + 0x3ad]
sub esp, 8
mov esi, dword [ebp - 0x1c]
mov ecx, dword [eax + ecx*4]
mov eax, esp
push 0x10
mov edx, dword [ecx]
mov dword [eax], edi
mov word [eax + 4], si
lea eax, [ebp - 0x28]
push eax
call dword [edx + 0x1c]
mov ecx, dword [ebp - 0x20]
mov esi, dword [ebx + 0x10]
inc ecx
mov dword [ebp - 0x20], ecx
cmp ecx, dword [esi + 0x3b1]
jb 0x40b4a3
push dword [ebp - 0x1c]
lea eax, [ebp - 0x28]
push edi
push 2
push eax
push dword [esi + 0x816]
call fcn.004191a0
jmp 0x40b97f
cmp al, 0x1a
jne 0x40ae5c
mov edi, dword [ebp - 0x14]
cmp edx, 3
jne 0x40ae5f
xor ecx, ecx
mov dword [ebp - 0x20], ecx
cmp dword [esi + 0x3b1], ecx
jbe 0x40b5a8
nop word [eax + eax]
mov eax, dword [esi + 0x3ad]
sub esp, 8
mov ecx, dword [eax + ecx*4]
mov eax, esp
push 0x18
push dword [ebx + 8]
mov edx, dword [ecx]
mov dword [eax], edi
mov edi, dword [ebp - 0x1c]
mov word [eax + 4], di
call dword [edx + 0x20]
mov ecx, dword [ebp - 0x20]
mov edx, dword [esi + 0x3b1]
inc ecx
mov edi, dword [ebp - 0x14]
mov dword [ebp - 0x20], ecx
cmp ecx, edx
jb 0x40b520
mov ecx, dword [ebx + 8]
mov eax, 0x6969
mov byte [ebp - 0x28], 0x18
xor ax, word [ecx + 1]
xor ecx, ecx
mov word [ebp - 0x27], ax
mov dword [ebp - 0x20], ecx
test edx, edx
je 0x40b5bc
mov eax, dword [esi + 0x3ad]
sub esp, 8
mov esi, dword [ebp - 0x1c]
mov ecx, dword [eax + ecx*4]
mov eax, esp
push 0x18
mov edx, dword [ecx]
mov dword [eax], edi
mov word [eax + 4], si
lea eax, [ebp - 0x28]
push eax
call dword [edx + 0x1c]
mov ecx, dword [ebp - 0x20]
mov esi, dword [ebx + 0x10]
inc ecx
mov dword [ebp - 0x20], ecx
cmp ecx, dword [esi + 0x3b1]
jb 0x40b572
jmp 0x40b5bc
mov ecx, dword [ebx + 8]
mov eax, 0x6969
mov byte [ebp - 0x28], 0x18
xor ax, word [ecx + 1]
mov word [ebp - 0x27], ax
push dword [ebp - 0x1c]
lea eax, [ebp - 0x28]
push edi
push 3
push eax
push dword [esi + 0x816]
call fcn.004191a0
jmp 0x40b97f
cmp al, 0x1a
jne 0x40b5e3
cmp edi, 3
jle 0x40b97f
cmp al, 0x19
jne 0x40b5f0
cmp edi, 2
jle 0x40b97f
cmp al, 0x1d
jne 0x40b5fd
cmp edi, 2
jle 0x40b97f
cmp al, 8
je 0x40b609
cmp al, 7
je 0x40b609
cmp al, 0x27
jne 0x40b612
cmp edi, 5
jae 0x40b97f
cmp al, 0x37
jne 0x40b622
cmp edi, 0x190
jl 0x40b97f
mov ecx, 1
call fcn.004051e0
mov edi, eax
mov ecx, dword [edi + 0x10]
mov byte [ecx], 0x26
mov dword [edi + 0xc], 8
jmp 0x40b953
xor ecx, ecx
mov dword [ebp - 0x20], ecx
cmp dword [esi + 0x3b1], ecx
jbe 0x40b68e
nop dword [eax]
mov eax, dword [esi + 0x3ad]
sub esp, 8
mov ecx, dword [eax + ecx*4]
mov eax, dword [ecx]
mov edx, dword [eax + 0x20]
mov eax, esp
mov dword [eax], edi
mov edi, dword [ebp - 0x1c]
mov word [eax + 4], di
mov edi, dword [ebx + 0xc]
lea eax, [edi*8]
push eax
push dword [ebx + 8]
call edx
mov ecx, dword [ebp - 0x20]
mov edi, dword [ebp - 0x14]
inc ecx
mov dword [ebp - 0x20], ecx
cmp ecx, dword [esi + 0x3b1]
jb 0x40b650
mov ecx, dword [ebx + 0xc]
cmp ecx, 0x200
jle 0x40b6c6
mov edi, dword [esi]
sub esp, 8
mov ecx, dword [ebp - 0x14]
mov eax, esp
mov dword [eax], ecx
mov ecx, dword [ebp - 0x1c]
mov word [eax + 4], cx
mov ecx, esi
mov eax, dword [edi + 0xb8]
call eax
push 0x2710
push eax
mov ecx, esi
call dword [edi + 0x64]
jmp 0x40b97f
mov eax, dword [ebx + 8]
mov al, byte [eax]
cmp al, 8
je 0x40b6d7
cmp al, 7
jne 0x40b917
cmp ecx, 5
jne 0x40b917
cmp al, 7
je 0x40b6f3
mov ecx, esi
call fcn.00409e30
test al, al
je 0x40b97f
mov eax, dword [ebx + 8]
mov dword [ebp - 0x390], 0x28
mov byte [ebp - 0x380], 0
mov dword [ebp - 0x38c], 0x28
mov dword [ebp - 0x384], eax
push 1
push 0x20
lea eax, [ebp - 0x38]
mov dword [ebp - 4], 1
push eax
lea ecx, [ebp - 0x390]
mov dword [ebp - 0x388], 8
call fcn.00402340
lea eax, [ebp - 0x14f]
mov dword [ebp - 0x160], 0
mov dword [ebp - 0x15c], 0x800
mov dword [ebp - 0x158], 0
mov dword [ebp - 0x154], eax
mov byte [ebp - 0x150], 1
push 1
push 8
lea eax, [ebp - 0x24]
mov byte [ebp - 4], 2
push eax
lea ecx, [ebp - 0x160]
mov byte [ebp - 0x24], 0x27
call fcn.00402210
mov eax, dword [ebp - 0x38]
lea ecx, [ebp - 0x160]
push 1
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x38]
push 0x20
push eax
call fcn.00402210
lea eax, [esi + 0x344]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 0x11c]
mov edx, dword [esi + 0x128]
add eax, 7
sar eax, 3
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], edx
test eax, eax
je 0x40b826
test byte [ebp - 0x160], 7
lea ecx, [eax*8]
mov dword [ebp - 0x3c], ecx
jne 0x40b817
shl eax, 3
lea ecx, [ebp - 0x160]
push eax
call fcn.004024e0
mov eax, dword [ebp - 0x160]
push dword [ebp - 0x38]
add eax, 7
push dword [ebp - 0x34]
sar eax, 3
add eax, dword [ebp - 0x154]
push eax
call fcn.00462e50
mov eax, dword [ebp - 0x3c]
add esp, 0xc
add dword [ebp - 0x160], eax
jmp 0x40b826
push 1
push ecx
push edx
lea ecx, [ebp - 0x160]
call fcn.00402210
lea eax, [esi + 0x344]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor ecx, ecx
mov dword [ebp - 0x20], ecx
cmp dword [esi + 0x3b1], ecx
jbe 0x40b881
mov eax, dword [esi + 0x3ad]
sub esp, 8
mov ecx, dword [eax + ecx*4]
mov eax, esp
mov edx, dword [ecx]
mov dword [eax], edi
mov edi, dword [ebp - 0x1c]
mov word [eax + 4], di
mov eax, dword [ebp - 0x160]
add eax, 7
sar eax, 3
push eax
push dword [ebp - 0x154]
call dword [edx + 0x1c]
mov ecx, dword [ebp - 0x20]
mov edi, dword [ebp - 0x14]
inc ecx
mov dword [ebp - 0x20], ecx
cmp ecx, dword [esi + 0x3b1]
jb 0x40b840
mov eax, dword [esi]
sub esp, 8
mov ecx, dword [ebp - 0x1c]
mov edx, dword [eax + 0xb8]
mov eax, esp
mov dword [eax], edi
mov word [eax + 4], cx
mov ecx, esi
call edx
mov ecx, dword [ebp - 0x160]
mov edi, dword [ebp - 0x154]
add ecx, 7
mov esi, dword [esi + 0x816]
sar ecx, 3
push eax
mov dword [ebp - 0x38], ecx
call dword [sym.imp.WS2_32.dll_inet_addr]
push dword [ebp - 0x1c]
push eax
push dword [ebp - 0x38]
push edi
push esi
call fcn.004191a0
cmp byte [ebp - 0x150], 0
je 0x40b8ee
cmp dword [ebp - 0x15c], 0x800
jle 0x40b8ee
push dword [ebp - 0x154]
call fcn.004684df
add esp, 4
cmp byte [ebp - 0x380], 0
je 0x40b97f
cmp dword [ebp - 0x38c], 0x800
jle 0x40b97f
push dword [ebp - 0x384]
call fcn.004684df
add esp, 4
jmp 0x40b97f
cmp al, 0x27
jne 0x40b920
lea eax, [ecx - 5]
jmp 0x40b927
cmp al, 0x37
jne 0x40b97f
lea eax, [ecx - 2]
cmp eax, 0x18f
ja 0x40b97f
call fcn.004051e0
push dword [ebx + 0xc]
mov edi, eax
push dword [ebx + 8]
push dword [edi + 0x10]
call fcn.00462e50
mov ecx, dword [ebx + 0xc]
add esp, 0xc
lea eax, [ecx*8]
mov dword [edi + 0xc], eax
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x1c]
push 1
sub esp, 8
mov dword [edi + 2], ecx
mov eax, esp
mov word [edi + 6], dx
mov dword [eax], ecx
mov ecx, esi
mov word [eax + 4], dx
call fcn.00408bd0
push edi
mov ecx, esi
mov word [edi], ax
call fcn.0040a9d0
mov ecx, dword [ebp - 0xc]
pop edi
mov dword fs:[0], ecx
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0xc