Function at 0x40ac50
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 0x4a43d6
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 0x40ad76
mov edi, dword [ebp - 0x14]
xor ecx, ecx
mov dword [ebp - 0x2c], ecx
cmp dword [esi + 0x3b1], ecx
jbe 0x40ad56
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 0x40acd0
xor ecx, ecx
mov word [ebp - 0x24], 0x24
mov dword [ebp - 0x2c], ecx
test eax, eax
je 0x40ad5c
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 0x40ad20
jmp 0x40ad5c
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.00419280
jmp 0x40bb6f
mov edx, dword [ebx + 8]
cmp byte [edx], 0x24
mov edx, dword [ebx + 0xc]
jne 0x40aedb
cmp edx, 2
ja 0x40aedb
mov eax, dword [esi + 0x3b9]
cmp eax, dword [esi + 0x3c5]
je 0x40aedb
cmp byte [eax + 0x116], 0
je 0x40aedb
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 0x40aedb
mov edx, ecx
nop
cmp dword [ecx + 0x112], 1
mov edi, dword [ebp - 0x14]
jne 0x40ae58
cmp dword [ecx], edi
jne 0x40ae58
mov eax, dword [ebp - 0x1c]
cmp word [ecx + 4], ax
jne 0x40ae58
mov byte [ebp - 0x15], 1
cmp ecx, edx
jne 0x40ae49
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 0x40ae43
cmp byte [eax + 0x116], 0
je 0x40ae43
mov edx, dword [esi + 0x3b9]
mov ecx, edx
mov eax, dword [edx + 0x117]
mov dword [esi + 0x3b9], eax
jmp 0x40ae81
xor edx, edx
mov ecx, edx
jmp 0x40ae81
mov eax, 0xffff
mov dword [ecx], 0xffffffff
mov word [ecx + 4], ax
mov eax, dword [esi + 0x3b9]
cmp eax, dword [esi + 0x3c5]
je 0x40ae89
cmp byte [eax + 0x116], 0
je 0x40ae89
mov ecx, dword [esi + 0x3b9]
mov eax, dword [ecx + 0x117]
mov dword [esi + 0x3b9], eax
test ecx, ecx
jne 0x40add0
test edx, edx
je 0x40ae93
mov dword [esi + 0x3b9], edx
cmp byte [ebp - 0x15], 0
je 0x40aed8
push 0x16
call fcn.00480d0c
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.0040abc0
mov edx, dword [ebx + 0xc]
mov eax, dword [ebx + 8]
mov al, byte [eax]
cmp al, 0x1f
jne 0x40b11a
cmp edx, 2
ja 0x40b04c
mov eax, dword [esi + 0x3b9]
cmp eax, dword [esi + 0x3c5]
je 0x40b04c
cmp byte [eax + 0x116], 0
je 0x40b04c
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 0x40b04c
mov edx, ecx
nop dword [eax]
nop word [eax + eax]
cmp dword [ecx + 0x112], 1
mov edi, dword [ebp - 0x14]
jne 0x40afcc
cmp dword [ecx], edi
jne 0x40afcc
mov eax, dword [ebp - 0x1c]
cmp word [ecx + 4], ax
jne 0x40afcc
mov byte [ebp - 0x15], 1
cmp ecx, edx
jne 0x40afbd
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 0x40afb7
cmp byte [eax + 0x116], 0
je 0x40afb7
mov edx, dword [esi + 0x3b9]
mov ecx, edx
mov eax, dword [edx + 0x117]
mov dword [esi + 0x3b9], eax
jmp 0x40aff5
xor edx, edx
mov ecx, edx
jmp 0x40aff5
mov eax, 0xffff
mov dword [ecx], 0xffffffff
mov word [ecx + 4], ax
mov eax, dword [esi + 0x3b9]
cmp eax, dword [esi + 0x3c5]
je 0x40affd
cmp byte [eax + 0x116], 0
je 0x40affd
mov ecx, dword [esi + 0x3b9]
mov eax, dword [ecx + 0x117]
mov dword [esi + 0x3b9], eax
test ecx, ecx
jne 0x40af40
test edx, edx
je 0x40b007
mov dword [esi + 0x3b9], edx
cmp byte [ebp - 0x15], 0
je 0x40b04c
push 0x16
call fcn.00480d0c
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.0040abc0
mov edi, dword [ebp - 0x14]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x48], edi
mov word [ebp - 0x44], ax
cmp edi, 0xffffffff
jne 0x40b06c
mov ecx, 0xffff
cmp ax, cx
je 0x40b830
lea ecx, [ebp - 0x23]
push ecx
lea ecx, [ebp - 0x48]
push ecx
lea ecx, [esi + 0x338]
call fcn.0040d620
cmp byte [ebp - 0x23], 0
je 0x40b830
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 0x40b830
cmp dword [ecx + 0x7ee], 7
jne 0x40b0ca
test dword [ebx + 0xc], 0x80000007
jne 0x40b0ca
lea eax, [ecx + 0x7d1]
add ecx, 0xd
push eax
call fcn.00411a30
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.004121f0
test al, al
jne 0x40bb6f
mov eax, dword [ebx + 8]
mov al, byte [eax]
cmp al, 0x18
jne 0x40b7c6
cmp edi, 3
jle 0x40bb6f
jmp 0x40b812
cmp al, 0x19
jne 0x40b414
cmp edx, 2
ja 0x40b04c
xor ecx, ecx
mov dword [ebp - 0x2c], ecx
cmp dword [esi + 0x3b1], ecx
jbe 0x40b17e
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 0x40b140
mov eax, dword [esi + 0x3b9]
cmp eax, dword [esi + 0x3c5]
je 0x40bb6f
cmp byte [eax + 0x116], 0
je 0x40bb6f
mov edi, dword [esi + 0x3b9]
mov eax, dword [edi + 0x117]
mov dword [esi + 0x3b9], eax
test edi, edi
je 0x40bb6f
mov ecx, edi
mov dword [ebp - 0x2c], ecx
nop dword [eax]
mov edx, dword [ebp - 0x14]
cmp dword [edi], edx
jne 0x40b3d0
mov eax, dword [ebp - 0x1c]
cmp word [edi + 4], ax
jne 0x40b3d0
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.00408e90
mov dword [ebp - 0x20], eax
test eax, eax
jne 0x40b21b
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.00409640
mov dword [ebp - 0x20], eax
test eax, eax
je 0x40b35c
call fcn.00403220
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.004022e0
mov al, byte [edi + 0x111]
test al, al
je 0x40b2fe
movzx eax, al
lea edx, [edi + 0x11]
mov dword [ebp - 0x20], eax
test eax, eax
je 0x40b2fe
test byte [ebp - 0x278], 7
lea ecx, [eax*8]
mov dword [ebp - 0x40], ecx
jne 0x40b2ef
shl eax, 3
lea ecx, [ebp - 0x278]
push eax
call fcn.004025b0
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.0047a8c0
mov eax, dword [ebp - 0x40]
add esp, 0xc
add dword [ebp - 0x278], eax
jmp 0x40b2fe
push 1
push ecx
push edx
lea ecx, [ebp - 0x278]
call fcn.004022e0
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.0040a710
mov dword [ebp - 4], 0xffffffff
cmp byte [ebp - 0x268], 0
je 0x40b35c
cmp dword [ebp - 0x274], 0x800
jle 0x40b35c
push dword [ebp - 0x26c]
call fcn.00480cf1
add esp, 4
mov ecx, dword [ebp - 0x2c]
cmp edi, ecx
jne 0x40b3c1
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 0x40b3b8
cmp byte [eax + 0x116], 0
je 0x40b3b8
mov ecx, dword [esi + 0x3b9]
mov edi, ecx
mov dword [ebp - 0x2c], ecx
mov eax, dword [ecx + 0x117]
mov dword [esi + 0x3b9], eax
jmp 0x40b3f9
xor ecx, ecx
mov dword [ebp - 0x2c], ecx
mov edi, ecx
jmp 0x40b3f9
mov eax, 0xffff
mov dword [edi], 0xffffffff
mov word [edi + 4], ax
mov eax, dword [esi + 0x3b9]
cmp eax, dword [esi + 0x3c5]
je 0x40b401
cmp byte [eax + 0x116], 0
je 0x40b401
mov edi, dword [esi + 0x3b9]
mov eax, dword [edi + 0x117]
mov dword [esi + 0x3b9], eax
test edi, edi
jne 0x40b1c0
test ecx, ecx
je 0x40bb6f
mov dword [esi + 0x3b9], ecx
jmp 0x40bb6f
cmp al, 0x1d
jne 0x40b552
cmp edx, 2
ja 0x40b04c
mov eax, dword [esi + 0x3b9]
cmp eax, dword [esi + 0x3c5]
je 0x40b04c
cmp byte [eax + 0x116], 0
je 0x40b04c
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 0x40b04c
mov edx, ecx
nop word [eax + eax]
cmp dword [ecx + 0x112], 1
mov edi, dword [ebp - 0x14]
jne 0x40b4f8
cmp dword [ecx], edi
jne 0x40b4f8
mov eax, dword [ebp - 0x1c]
cmp word [ecx + 4], ax
jne 0x40b4f8
mov byte [ebp - 0x15], 1
cmp ecx, edx
jne 0x40b4e9
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 0x40b4e3
cmp byte [eax + 0x116], 0
je 0x40b4e3
mov edx, dword [esi + 0x3b9]
mov ecx, edx
mov eax, dword [edx + 0x117]
mov dword [esi + 0x3b9], eax
jmp 0x40b521
xor edx, edx
mov ecx, edx
jmp 0x40b521
mov eax, 0xffff
mov dword [ecx], 0xffffffff
mov word [ecx + 4], ax
mov eax, dword [esi + 0x3b9]
cmp eax, dword [esi + 0x3c5]
je 0x40b529
cmp byte [eax + 0x116], 0
je 0x40b529
mov ecx, dword [esi + 0x3b9]
mov eax, dword [ecx + 0x117]
mov dword [esi + 0x3b9], eax
test ecx, ecx
jne 0x40b470
test edx, edx
je 0x40b533
mov dword [esi + 0x3b9], edx
cmp byte [ebp - 0x15], 0
je 0x40b04c
mov ecx, 1
call fcn.004053e0
mov ecx, dword [eax + 0x10]
mov byte [ecx], 0x1d
jmp 0x40b02b
cmp al, 0x18
jne 0x40b6e1
mov edi, dword [ebp - 0x14]
cmp edx, 3
jne 0x40b04f
xor ecx, ecx
mov dword [ebp - 0x20], ecx
cmp dword [esi + 0x3b1], ecx
jbe 0x40b5a8
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 0x40b573
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.00408e90
mov ecx, eax
test ecx, ecx
je 0x40b654
cmp byte [ecx + 0x68f], 1
je 0x40b650
mov eax, dword [ecx + 0x7ee]
cmp eax, 8
je 0x40b5ed
cmp eax, 1
je 0x40b5ed
cmp eax, 2
jne 0x40b04f
xor ecx, ecx
mov word [ebp - 0x28], 0x1d
mov dword [ebp - 0x20], ecx
cmp dword [esi + 0x3b1], ecx
je 0x40b636
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 0x40b600
push dword [ebp - 0x1c]
lea eax, [ebp - 0x28]
push edi
push 2
push eax
push dword [esi + 0x816]
call fcn.00419280
jmp 0x40b04f
test ecx, ecx
jne 0x40b66b
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.00409640
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 0x40b6c7
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 0x40b693
push dword [ebp - 0x1c]
lea eax, [ebp - 0x28]
push edi
push 2
push eax
push dword [esi + 0x816]
call fcn.00419280
jmp 0x40bb6f
cmp al, 0x1a
jne 0x40b04c
mov edi, dword [ebp - 0x14]
cmp edx, 3
jne 0x40b04f
xor ecx, ecx
mov dword [ebp - 0x20], ecx
cmp dword [esi + 0x3b1], ecx
jbe 0x40b798
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 0x40b710
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 0x40b7ac
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 0x40b762
jmp 0x40b7ac
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.00419280
jmp 0x40bb6f
cmp al, 0x1a
jne 0x40b7d3
cmp edi, 3
jle 0x40bb6f
cmp al, 0x19
jne 0x40b7e0
cmp edi, 2
jle 0x40bb6f
cmp al, 0x1d
jne 0x40b7ed
cmp edi, 2
jle 0x40bb6f
cmp al, 8
je 0x40b7f9
cmp al, 7
je 0x40b7f9
cmp al, 0x27
jne 0x40b802
cmp edi, 5
jae 0x40bb6f
cmp al, 0x37
jne 0x40b812
cmp edi, 0x190
jl 0x40bb6f
mov ecx, 1
call fcn.004053e0
mov edi, eax
mov ecx, dword [edi + 0x10]
mov byte [ecx], 0x26
mov dword [edi + 0xc], 8
jmp 0x40bb43
xor ecx, ecx
mov dword [ebp - 0x20], ecx
cmp dword [esi + 0x3b1], ecx
jbe 0x40b87e
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 0x40b840
mov ecx, dword [ebx + 0xc]
cmp ecx, 0x200
jle 0x40b8b6
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 0x40bb6f
mov eax, dword [ebx + 8]
mov al, byte [eax]
cmp al, 8
je 0x40b8c7
cmp al, 7
jne 0x40bb07
cmp ecx, 5
jne 0x40bb07
cmp al, 7
je 0x40b8e3
mov ecx, esi
call fcn.0040a020
test al, al
je 0x40bb6f
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.00402410
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.004022e0
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.004022e0
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 0x40ba16
test byte [ebp - 0x160], 7
lea ecx, [eax*8]
mov dword [ebp - 0x3c], ecx
jne 0x40ba07
shl eax, 3
lea ecx, [ebp - 0x160]
push eax
call fcn.004025b0
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.0047a8c0
mov eax, dword [ebp - 0x3c]
add esp, 0xc
add dword [ebp - 0x160], eax
jmp 0x40ba16
push 1
push ecx
push edx
lea ecx, [ebp - 0x160]
call fcn.004022e0
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 0x40ba71
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 0x40ba30
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.00419280
cmp byte [ebp - 0x150], 0
je 0x40bade
cmp dword [ebp - 0x15c], 0x800
jle 0x40bade
push dword [ebp - 0x154]
call fcn.00480cf1
add esp, 4
cmp byte [ebp - 0x380], 0
je 0x40bb6f
cmp dword [ebp - 0x38c], 0x800
jle 0x40bb6f
push dword [ebp - 0x384]
call fcn.00480cf1
add esp, 4
jmp 0x40bb6f
cmp al, 0x27
jne 0x40bb10
lea eax, [ecx - 5]
jmp 0x40bb17
cmp al, 0x37
jne 0x40bb6f
lea eax, [ecx - 2]
cmp eax, 0x18f
ja 0x40bb6f
call fcn.004053e0
push dword [ebx + 0xc]
mov edi, eax
push dword [ebx + 8]
push dword [edi + 0x10]
call fcn.0047a8c0
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.00408dd0
push edi
mov ecx, esi
mov word [edi], ax
call fcn.0040abc0
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