Function at 0x40cd0d
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
or dword [eax], eax
fild dword [ebp - 0x34]
fld st(1)
mov dword [ebp - 0x18], eax
fcompp
fnstsw ax
fstp st(0)
sahf
jne 0x40cd31
fild dword [ebp - 0x18]
fcomp qword [ebp - 0x2c]
fnstsw ax
sahf
jne 0x40cd31
mov byte [ebp - 1], 1
jmp 0x40cd35
and byte [ebp - 1], 0
push ebx
mov ebx, dword [ebp + 0x20]
mov ecx, dword [ebx + 0xf0]
mov eax, ecx
imul eax, dword [ebp + 0x18]
cdq
idiv dword [ebp + 0x2c]
push esi
mov esi, dword [ebx + 0xf4]
and dword [ebp - 0x14], 0
and byte [ebp - 2], 0
push edi
xor edi, edi
mov dword [ebp - 0x10], eax
mov eax, esi
imul eax, dword [ebp + 0x1c]
cdq
idiv dword [ebp + 0x30]
mov dx, word [ebx + 0xfa]
mov dword [ebp - 0xc], eax
xor eax, eax
mov ax, dx
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x21918]
cmp eax, edi
je 0x40cdd4
cmp dword [ebx + 0xb8], edi
jne 0x40cdcc
cmp dword [ebx + 0x24], edi
jne 0x40cdcc
cmp byte [ebx + 0xcb], 0
jne 0x40cdcc
push dword [ebp + 0x34]
mov eax, dword [ebp + 0xc]
push dword [ebp + 0x30]
push dword [ebp + 0x2c]
push dword [ebp + 0x28]
push dword [ebp + 0x24]
push dword [ebx + 0x20]
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [eax + 0x20]
call dword [0x4ad018]
jmp 0x40da30
cmp eax, edi
jne 0x40cf20
cmp dword [ebp - 0x10], ecx
jle 0x40cefe
cmp dword [ebp - 0xc], esi
jle 0x40cefe
cmp dx, 0x18
je 0x40cee4
push ebx
push edi
push edi
lea eax, [ebx + 0x114]
push eax
push dword [ebx + 0x30]
push 0x18
push esi
push ecx
push dword [ebp + 8]
call fcn.0040bc75
mov esi, eax
push esi
call fcn.00405a86
add esp, 0x28
test al, al
je 0x40ce4d
mov eax, esi
and eax, 0xc0000000
cmp eax, 0x40000000
jne 0x40ce47
mov eax, esi
and eax, 0xffffff
jbe 0x40ce47
cmp eax, dword [0x4ed078]
ja 0x40ce47
mov ecx, dword [0x4ec470]
lea eax, [eax + eax*4]
mov eax, dword [ecx + eax*8]
cmp eax, edi
jne 0x40ce49
xor eax, eax
mov esi, eax
jmp 0x40ce4f
xor esi, esi
push 0xcc0020
push edi
push edi
push dword [ebx + 0x20]
push dword [ebx + 0xf4]
push dword [ebx + 0xf0]
push edi
push edi
push dword [esi + 0x20]
call dword [0x4ad01c]
push 0x2000
push dword [ebp - 0xc]
push dword [ebp - 0x10]
push edi
push dword [esi + 0x14]
call dword [0x4ad368]
mov esi, dword [esi + 0x10]
mov dword [ebp - 0x14], eax
mov eax, esi
and eax, 0xc0000000
cmp eax, 0x40000000
jne 0x40cedb
mov eax, esi
and eax, 0xffffff
jbe 0x40cedb
cmp eax, dword [0x4ed078]
ja 0x40cedb
mov ecx, dword [0x4ec470]
lea eax, [eax + eax*4]
shl eax, 3
add ecx, eax
cmp dword [ecx], edi
je 0x40cedb
dec dword [ecx + 8]
mov ecx, dword [0x4ec470]
add eax, ecx
cmp dword [eax + 8], edi
jg 0x40cedb
test word [eax + 0x1c], 0x3fff
jne 0x40cedb
push esi
call fcn.00420906
pop ecx
mov dword [ebp - 8], 0x18
jmp 0x40cf20
push 0x2000
push dword [ebp - 0xc]
push dword [ebp - 0x10]
push edi
push dword [ebx + 0x14]
call dword [0x4ad368]
mov dword [ebp - 0x14], eax
jmp 0x40cf20
push 0x18
pop eax
cmp dword [ebp - 8], eax
mov byte [ebp - 2], 1
jge 0x40cf20
cmp dword [ebp - 8], 1
jne 0x40cf1d
cmp byte [ebp - 1], 0
mov dword [ebp - 8], 8
jne 0x40cf20
mov dword [ebp - 8], eax
movzx eax, word [ebx + 0xfa]
cmp eax, dword [ebp - 8]
push ebx
push edi
push dword [ebp - 0x14]
jne 0x40cf3d
lea eax, [ebx + 0x114]
push eax
push dword [ebx + 0x30]
jmp 0x40cf3f
push edi
push edi
push dword [ebp - 8]
push dword [ebp - 0xc]
push dword [ebp - 0x10]
push dword [ebp + 8]
call fcn.0040bc75
mov esi, eax
push esi
call fcn.00405a86
add esp, 0x28
test al, al
je 0x40cf95
mov eax, esi
and eax, 0xc0000000
cmp eax, 0x40000000
jne 0x40cf8e
mov eax, esi
and eax, 0xffffff
jbe 0x40cf8e
cmp eax, dword [0x4ed078]
ja 0x40cf8e
mov ecx, dword [0x4ec470]
lea eax, [eax + eax*4]
mov eax, dword [ecx + eax*8]
cmp eax, edi
jne 0x40cf90
xor eax, eax
mov dword [ebp - 8], eax
jmp 0x40cf98
mov dword [ebp - 8], edi
cmp dword [ebp - 0x14], edi
jne 0x40d968
cmp byte [ebp - 2], 0
je 0x40d940
mov ax, word [ebx + 0xfa]
xor esi, esi
cmp ax, 0x18
mov dword [ebp - 0x24], esi
mov edi, ebx
jae 0x40d060
cmp ax, 1
jne 0x40cfd3
cmp byte [ebp - 1], 0
jne 0x40d06a
lea eax, [ebx + 0x114]
push eax
push dword [ebx + 0x30]
push 0x18
push dword [ebx + 0xf4]
push dword [ebx + 0xf0]
push dword [ebp + 8]
call fcn.0040c1e1
mov edi, eax
push edi
call fcn.00405a86
add esp, 0x1c
test al, al
je 0x40d037
mov eax, edi
and eax, 0xc0000000
cmp eax, 0x40000000
jne 0x40d031
mov eax, edi
and eax, 0xffffff
jbe 0x40d031
cmp eax, dword [0x4ed078]
ja 0x40d031
mov ecx, dword [0x4ec470]
lea eax, [eax + eax*4]
mov eax, dword [ecx + eax*8]
cmp eax, esi
jne 0x40d033
xor eax, eax
mov edi, eax
jmp 0x40d039
xor edi, edi
push 0xcc0020
push esi
push esi
push dword [ebx + 0x20]
push dword [ebx + 0xf4]
push dword [ebx + 0xf0]
push esi
push esi
push dword [edi + 0x20]
call dword [0x4ad01c]
mov eax, dword [edi + 0x10]
mov dword [ebp - 0x24], eax
cmp byte [ebp - 1], 0
je 0x40d508
cmp word [ebx + 0xfa], 1
jne 0x40d38e
cmp dword [ebp - 0x34], 8
jne 0x40d229
cmp dword [ebp - 0x18], 8
jne 0x40d229
cmp dword [str.icon], esi
je 0x40d0f4
xor eax, eax
mov ecx, eax
shr ecx, 7
and cl, 1
mov edx, eax
shr edx, 6
and dl, 1
add cl, dl
mov edx, eax
shr edx, 5
and dl, 1
add cl, dl
mov edx, eax
shr edx, 4
and dl, 1
add cl, dl
mov edx, eax
shr edx, 3
and dl, 1
add cl, dl
mov edx, eax
shr edx, 2
and dl, 1
add cl, dl
mov edx, eax
shr edx, 1
and dl, 1
add cl, dl
mov dl, al
and dl, 1
add cl, dl
mov byte [eax + 0x4ebfd8], cl
inc eax
cmp eax, 0x100
jl 0x40d096
mov dword [str.icon], esi
mov eax, dword [edi + 4]
mov ecx, dword [edi]
mov edx, eax
imul edx, edx, 7
lea esi, [eax + eax*2]
mov dword [ebp - 0x34], ecx
mov ecx, dword [ebp - 8]
mov ecx, dword [ecx]
shl esi, 1
cmp dword [ebp - 0xc], 0
mov dword [ebp - 0x58], edx
jle 0x40d8dd
mov edi, dword [ebp - 0xc]
mov dword [ebp - 0x50], edi
mov edi, dword [ebp - 0x34]
mov ebx, eax
shl ebx, 3
add dword [ebp - 0x34], ebx
mov dword [ebp - 0x5c], ebx
mov ebx, dword [ebp - 8]
mov dword [ebp - 0x38], ecx
add ecx, dword [ebx + 4]
mov ebx, dword [ebp - 0x10]
test ebx, ebx
mov dword [ebp - 0x5c], ecx
jle 0x40d218
mov dword [ebp - 0xc], edx
sub dword [ebp - 0xc], esi
lea edx, [eax + eax*4]
mov dword [ebp - 0x14], edx
sub dword [ebp - 0x14], esi
mov edx, eax
shl edx, 2
mov dword [ebp - 0x18], edx
sub dword [ebp - 0x18], esi
lea edx, [eax + eax*2]
mov dword [ebp - 0x20], edx
sub dword [ebp - 0x20], esi
lea edx, [eax + eax]
mov dword [ebp - 0x28], edx
sub dword [ebp - 0x28], esi
mov dword [ebp - 0x30], eax
sub dword [ebp - 0x30], esi
lea ecx, [edi + esi]
mov dword [ebp - 0x54], ebx
mov edx, dword [ebp - 0x30]
movzx edx, byte [edx + ecx]
movzx edx, byte [edx + 0x4ebfd8]
mov ebx, dword [ebp - 0x28]
movzx ebx, byte [ebx + ecx]
movzx ebx, byte [ebx + 0x4ebfd8]
add edx, ebx
mov ebx, dword [ebp - 0x20]
movzx ebx, byte [ebx + ecx]
movzx ebx, byte [ebx + 0x4ebfd8]
add edx, ebx
mov ebx, dword [ebp - 0x18]
movzx ebx, byte [ebx + ecx]
movzx ebx, byte [ebx + 0x4ebfd8]
add edx, ebx
mov ebx, dword [ebp - 0x14]
movzx ebx, byte [ebx + ecx]
movzx ebx, byte [ebx + 0x4ebfd8]
add edx, ebx
mov ebx, dword [ebp - 0xc]
movzx ebx, byte [ebx + ecx]
movzx ebx, byte [ebx + 0x4ebfd8]
add edx, ebx
movzx ebx, byte [edi]
movzx ebx, byte [ebx + 0x4ebfd8]
add edx, ebx
movzx ebx, byte [ecx]
movzx ebx, byte [ebx + 0x4ebfd8]
add edx, ebx
mov ebx, dword [ebp - 0x38]
imul edx, edx, 0xff
sar edx, 6
inc dword [ebp - 0x38]
inc edi
inc ecx
dec dword [ebp - 0x54]
mov byte [ebx], dl
jne 0x40d17b
mov ebx, dword [ebp + 0x20]
mov edx, dword [ebp - 0x58]
mov ecx, dword [ebp - 0x5c]
jmp 0x40d21b
mov ebx, dword [ebp + 0x20]
dec dword [ebp - 0x50]
jne 0x40d11e
jmp 0x40d8dd
xor ecx, ecx
cmp dword [ebp - 0xc], esi
mov dword [ebp - 0x48], ecx
mov dword [ebp - 0x30], esi
jle 0x40d8dd
mov esi, dword [ebp - 8]
xor eax, eax
cmp dword [ebp - 0x10], eax
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x14], eax
jle 0x40d371
mov edx, dword [ebp - 0x18]
add ecx, edx
mov dword [ebp - 0x54], ecx
mov ecx, dword [ebp - 0x34]
and dword [ebp - 0x28], 0
and dword [ebp - 0x38], 0
add ecx, eax
mov dword [ebp - 0x40], ecx
mov ecx, dword [ebp - 0x48]
cmp ecx, dword [ebp - 0x54]
mov dword [ebp - 0x20], ecx
jge 0x40d35c
jmp 0x40d27a
mov eax, dword [ebp - 0x50]
mov dword [ebp + 0x20], eax
cmp eax, dword [ebp - 0x40]
jge 0x40d2ef
test edi, edi
je 0x40d2e7
mov ecx, dword [edi + 0x50]
mov eax, dword [edi]
mov edx, ecx
sub edx, dword [ebp - 0x20]
dec edx
test eax, eax
je 0x40d2e7
test edx, edx
jl 0x40d2c7
cmp edx, ecx
jge 0x40d2c7
cmp dword [ebp + 0x20], 0
jl 0x40d2e7
mov ecx, dword [ebp + 0x20]
cmp ecx, dword [edi + 0x4c]
jge 0x40d2e7
movzx esi, word [edi + 0xfa]
imul esi, ecx
mov ecx, dword [edi + 4]
imul ecx, edx
sar esi, 3
add eax, esi
mov esi, dword [ebp - 8]
add ecx, eax
jmp 0x40d2c9
xor ecx, ecx
test ecx, ecx
je 0x40d2e7
mov eax, dword [ebp + 0x20]
and eax, 7
mov al, byte [eax + 0x4ca9cc]
and al, byte [ecx]
neg al
sbb eax, eax
neg eax
add dword [ebp - 0x38], eax
inc dword [ebp - 0x28]
inc dword [ebp + 0x20]
mov eax, dword [ebp + 0x20]
jmp 0x40d27d
inc dword [ebp - 0x20]
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0x54]
jl 0x40d277
xor ecx, ecx
cmp dword [ebp - 0x28], ecx
jle 0x40d35c
cmp esi, ecx
je 0x40d34d
mov ecx, dword [esi + 0x50]
mov eax, dword [esi]
mov edx, ecx
sub edx, dword [ebp - 0x30]
dec edx
test eax, eax
je 0x40d34b
test edx, edx
jl 0x40d34b
cmp edx, ecx
jge 0x40d34b
mov ecx, dword [ebp - 0x14]
test ecx, ecx
jl 0x40d34b
cmp ecx, dword [esi + 0x4c]
jge 0x40d34b
movzx esi, word [esi + 0xfa]
imul esi, ecx
mov ecx, dword [ebp - 8]
mov ecx, dword [ecx + 4]
imul ecx, edx
sar esi, 3
add eax, esi
mov esi, dword [ebp - 8]
add ecx, eax
jmp 0x40d34d
xor ecx, ecx
mov eax, dword [ebp - 0x38]
imul eax, eax, 0xff
cdq
idiv dword [ebp - 0x28]
mov byte [ecx], al
inc dword [ebp - 0x14]
mov ecx, dword [ebp - 0x14]
cmp ecx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x50], eax
jl 0x40d256
mov ecx, dword [ebp - 0x48]
add ecx, dword [ebp - 0x18]
inc dword [ebp - 0x30]
mov eax, dword [ebp - 0x30]
cmp eax, dword [ebp - 0xc]
mov dword [ebp - 0x48], ecx
jl 0x40d23d
jmp 0x40d8dd
xor eax, eax
cmp dword [ebp - 0xc], esi
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x28], esi
jle 0x40d8dd
mov esi, dword [ebp - 8]
xor ecx, ecx
cmp dword [ebp - 0x10], ecx
mov dword [ebp - 0x5c], ecx
mov dword [ebp - 0x20], ecx
jle 0x40d4ee
mov edx, dword [ebp - 0x18]
add edx, eax
mov dword [ebp - 0x58], edx
xor edx, edx
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x48], edx
mov dword [ebp - 0x40], edx
mov dword [ebp - 0x38], edx
mov edx, dword [ebp - 0x34]
add edx, ecx
cmp eax, dword [ebp - 0x58]
mov dword [ebp - 0x50], edx
mov dword [ebp - 0x30], eax
jge 0x40d4d6
jmp 0x40d3e2
mov ecx, dword [ebp - 0x5c]
cmp ecx, dword [ebp - 0x50]
mov dword [ebp + 0x20], ecx
jge 0x40d457
test edi, edi
je 0x40d44c
mov ecx, dword [edi + 0x50]
mov eax, dword [edi]
mov edx, ecx
sub edx, dword [ebp - 0x30]
dec edx
test eax, eax
je 0x40d44c
test edx, edx
jl 0x40d42f
cmp edx, ecx
jge 0x40d42f
cmp dword [ebp + 0x20], 0
jl 0x40d44c
mov ecx, dword [ebp + 0x20]
cmp ecx, dword [edi + 0x4c]
jge 0x40d44c
movzx esi, word [edi + 0xfa]
imul esi, ecx
mov ecx, dword [edi + 4]
imul ecx, edx
sar esi, 3
add eax, esi
mov esi, dword [ebp - 8]
add ecx, eax
jmp 0x40d431
xor ecx, ecx
test ecx, ecx
je 0x40d44c
movzx eax, byte [ecx]
add dword [ebp - 0x48], eax
movzx eax, byte [ecx + 1]
add dword [ebp - 0x40], eax
movzx eax, byte [ecx + 2]
add dword [ebp - 0x38], eax
inc dword [ebp - 0x14]
inc dword [ebp + 0x20]
mov eax, dword [ebp + 0x20]
cmp eax, dword [ebp - 0x50]
jl 0x40d3ea
inc dword [ebp - 0x30]
mov eax, dword [ebp - 0x30]
cmp eax, dword [ebp - 0x58]
jl 0x40d3df
xor ecx, ecx
cmp dword [ebp - 0x14], ecx
jle 0x40d4d6
cmp esi, ecx
je 0x40d4b6
mov ecx, dword [esi + 0x50]
mov eax, dword [esi]
mov edx, ecx
sub edx, dword [ebp - 0x28]
dec edx
test eax, eax
je 0x40d4b4
test edx, edx
jl 0x40d4b4
cmp edx, ecx
jge 0x40d4b4
mov ecx, dword [ebp - 0x20]
test ecx, ecx
jl 0x40d4b4
cmp ecx, dword [esi + 0x4c]
jge 0x40d4b4
movzx ecx, word [esi + 0xfa]
imul ecx, dword [ebp - 0x20]
sar ecx, 3
mov dword [ebp + 0x20], ecx
mov ecx, dword [esi + 4]
imul ecx, edx
mov edx, dword [ebp + 0x20]
add eax, edx
add ecx, eax
jmp 0x40d4b6
xor ecx, ecx
mov eax, dword [ebp - 0x48]
cdq
idiv dword [ebp - 0x14]
mov esi, dword [ebp - 8]
mov byte [ecx], al
mov eax, dword [ebp - 0x40]
cdq
idiv dword [ebp - 0x14]
mov byte [ecx + 1], al
mov eax, dword [ebp - 0x38]
cdq
idiv dword [ebp - 0x14]
mov byte [ecx + 2], al
inc dword [ebp - 0x20]
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x50]
cmp eax, dword [ebp - 0x10]
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x5c], ecx
jl 0x40d3bb
add eax, dword [ebp - 0x18]
inc dword [ebp - 0x28]
mov ecx, dword [ebp - 0x28]
cmp ecx, dword [ebp - 0xc]
mov dword [ebp - 0x54], eax
jl 0x40d3a2
jmp 0x40d8dd
cmp dword [ebp - 0xc], esi
fldz
mov dword [ebp - 0x30], esi
jle 0x40d8db
fld qword [0x4ad3a8]
cmp dword [ebp - 0x10], esi
fldz
fstp qword [ebp - 0x3c]
mov dword [ebp - 0x34], esi
jle 0x40d8c3
fld st(1)
fadd qword [ebp - 0x2c]
fld st(0)
call fcn.004a4198
mov dword [ebp - 0x5c], eax
fild dword [ebp - 0x5c]
fsubr st(1)
fstp qword [ebp - 0x6c]
fstp st(0)
fld st(1)
call fcn.004a4198
mov dword [ebp - 0x58], eax
fild dword [ebp - 0x58]
fsubr st(2)
fsubr st(1)
fstp qword [ebp - 0x74]
fldz
fldz
fldz
fstp qword [ebp - 0x4c]
fldz
fstp qword [ebp - 0x44]
fld qword [ebp - 0x3c]
fadd qword [ebp - 0x64]
fst qword [ebp - 0x7c]
fld st(0)
call fcn.004a4198
mov dword [ebp - 0x54], eax
fisub dword [ebp - 0x54]
mov dword [ebp + 0x20], eax
mov eax, dword [ebp - 0x5c]
fld qword [ebp - 0x6c]
mov dword [ebp - 0x20], eax
fstp qword [ebp - 0x1c]
fcom qword [0x4ad3a0]
fnstsw ax
sahf
jne 0x40d59f
dec dword [ebp + 0x20]
fstp st(0)
fld1
fld qword [ebp - 0x1c]
fcomp qword [0x4ad3a0]
fnstsw ax
sahf
jne 0x40d5b5
dec dword [ebp - 0x20]
fld1
fstp qword [ebp - 0x1c]
mov eax, dword [ebp - 0x58]
fld qword [ebp - 0x74]
cmp eax, dword [ebp - 0x20]
mov dword [ebp - 0x14], eax
jg 0x40d8a4
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x20]
jne 0x40d5d6
fld st(0)
fmul qword [ebp - 0x1c]
fstp st(1)
fcom st(4)
fnstsw ax
sahf
je 0x40d6a1
fld qword [ebp - 0x3c]
call fcn.004a4198
mov dword [ebp - 0x54], eax
fild dword [ebp - 0x54]
mov esi, eax
fsubr qword [ebp - 0x3c]
fsubr st(5)
fmul st(1)
cmp esi, dword [ebp + 0x20]
mov dword [ebp - 0x54], esi
jg 0x40d807
jne 0x40d60e
fld st(0)
fmul st(2)
fmul st(3)
fstp st(1)
test edi, edi
je 0x40d697
mov eax, dword [edi + 0x50]
mov edx, dword [edi]
mov ecx, eax
sub ecx, dword [ebp - 0x14]
dec ecx
test edx, edx
je 0x40d697
test ecx, ecx
jl 0x40d658
cmp ecx, eax
jge 0x40d658
test esi, esi
jl 0x40d697
cmp esi, dword [edi + 0x4c]
jge 0x40d697
movzx eax, word [edi + 0xfa]
imul eax, esi
mov esi, dword [ebp - 0x54]
sar eax, 3
mov dword [ebp - 0x50], eax
mov eax, dword [edi + 4]
imul eax, ecx
mov ecx, dword [ebp - 0x50]
add edx, ecx
add eax, edx
jmp 0x40d65a
xor eax, eax
test eax, eax
je 0x40d697
movzx ecx, byte [eax]
mov dword [ebp - 0x54], ecx
movzx ecx, byte [eax + 1]
fild dword [ebp - 0x54]
movzx eax, byte [eax + 2]
fmul st(1)
mov dword [ebp - 0x54], ecx
fadd st(4)
fstp st(4)
fild dword [ebp - 0x54]
mov dword [ebp - 0x54], eax
fmul st(1)
fadd qword [ebp - 0x4c]
fstp qword [ebp - 0x4c]
fild dword [ebp - 0x54]
fmul st(1)
fadd qword [ebp - 0x44]
fstp qword [ebp - 0x44]
fadd st(4)
fstp st(4)
jmp 0x40d699
fstp st(0)
fld st(0)
inc esi
jmp 0x40d5f8
fstp st(0)
fld qword [ebp - 0x3c]
call fcn.004a4198
mov esi, eax
mov dword [ebp - 0x54], esi
fild dword [ebp - 0x54]
fsubr qword [ebp - 0x3c]
fsubr st(4)
fcom st(4)
fnstsw ax
sahf
jne 0x40d777
fld st(1)
fcomp st(5)
fnstsw ax
sahf
jne 0x40d777
cmp esi, dword [ebp + 0x20]
mov dword [ebp - 0x54], esi
jg 0x40d809
jne 0x40d6e4
fld st(0)
fmul st(2)
fstp st(1)
test edi, edi
je 0x40d76d
mov eax, dword [edi + 0x50]
mov edx, dword [edi]
mov ecx, eax
sub ecx, dword [ebp - 0x14]
dec ecx
test edx, edx
je 0x40d76d
test ecx, ecx
jl 0x40d72e
cmp ecx, eax
jge 0x40d72e
test esi, esi
jl 0x40d76d
cmp esi, dword [edi + 0x4c]
jge 0x40d76d
movzx eax, word [edi + 0xfa]
imul eax, esi
mov esi, dword [ebp - 0x54]
sar eax, 3
mov dword [ebp - 0x50], eax
mov eax, dword [edi + 4]
imul eax, ecx
mov ecx, dword [ebp - 0x50]
add edx, ecx
add eax, edx
jmp 0x40d730
xor eax, eax
test eax, eax
je 0x40d76d
movzx ecx, byte [eax]
mov dword [ebp - 0x54], ecx
movzx ecx, byte [eax + 1]
fild dword [ebp - 0x54]
movzx eax, byte [eax + 2]
fmul st(1)
mov dword [ebp - 0x54], ecx
fadd st(3)
fstp st(3)
fild dword [ebp - 0x54]
mov dword [ebp - 0x54], eax
fmul st(1)
fadd qword [ebp - 0x4c]
fstp qword [ebp - 0x4c]
fild dword [ebp - 0x54]
fmul st(1)
fadd qword [ebp - 0x44]
fstp qword [ebp - 0x44]
fadd st(3)
fstp st(3)
jmp 0x40d76f
fstp st(0)
fld1
inc esi
jmp 0x40d6d0
fstp st(0)
cmp esi, dword [ebp + 0x20]
mov dword [ebp - 0x54], esi
jg 0x40d80b
test edi, edi
je 0x40d801
mov eax, dword [edi + 0x50]
mov edx, dword [edi]
mov ecx, eax
sub ecx, dword [ebp - 0x14]
dec ecx
test edx, edx
je 0x40d801
test ecx, ecx
jl 0x40d7c8
cmp ecx, eax
jge 0x40d7c8
test esi, esi
jl 0x40d801
cmp esi, dword [edi + 0x4c]
jge 0x40d801
movzx eax, word [edi + 0xfa]
imul eax, esi
sar eax, 3
mov dword [ebp - 0x50], eax
mov eax, dword [edi + 4]
imul eax, ecx
mov ecx, dword [ebp - 0x50]
add edx, ecx
add eax, edx
jmp 0x40d7ca
xor eax, eax
test eax, eax
je 0x40d801
movzx ecx, byte [eax]
mov dword [ebp - 0x54], ecx
movzx ecx, byte [eax + 1]
fild dword [ebp - 0x54]
movzx eax, byte [eax + 2]
fadd st(2)
mov dword [ebp - 0x54], ecx
fstp st(2)
fild dword [ebp - 0x54]
mov dword [ebp - 0x54], eax
fadd qword [ebp - 0x4c]
fstp qword [ebp - 0x4c]
fild dword [ebp - 0x54]
fadd qword [ebp - 0x44]
fstp qword [ebp - 0x44]
fld st(2)
fadd st(4)
fstp st(3)
inc esi
jmp 0x40d779
fstp st(0)
fstp st(0)
inc dword [ebp - 0x14]
fld1
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x20]
jle 0x40d5c7
fstp st(0)
fstp st(0)
fld st(1)
fcomp qword [0x4ad3a0]
fnstsw ax
sahf
jbe 0x40d8a8
cmp dword [ebp - 8], 0
jne 0x40d837
xor esi, esi
jmp 0x40d87d
mov esi, dword [ebp - 8]
mov eax, dword [esi + 0x50]
mov edx, dword [esi]
mov ecx, eax
sub ecx, dword [ebp - 0x30]
dec ecx
test edx, edx
je 0x40d879
test ecx, ecx
jl 0x40d879
cmp ecx, eax
jge 0x40d879
mov eax, dword [ebp - 0x34]
test eax, eax
jl 0x40d879
cmp eax, dword [esi + 0x4c]
jge 0x40d879
movzx esi, word [esi + 0xfa]
imul esi, eax
mov eax, dword [ebp - 8]
mov eax, dword [eax + 4]
imul eax, ecx
sar esi, 3
add edx, esi
add eax, edx
jmp 0x40d87b
xor eax, eax
mov esi, eax
fdiv st(1)
call fcn.004a4198
fld qword [ebp - 0x4c]
fdiv st(1)
mov byte [esi], al
call fcn.004a4198
fld qword [ebp - 0x44]
fdiv st(1)
mov byte [esi + 1], al
call fcn.004a4198
fstp st(0)
mov byte [esi + 2], al
jmp 0x40d8ac
fstp st(0)
fstp st(0)
fstp st(0)
fstp st(0)
inc dword [ebp - 0x34]
fld qword [ebp - 0x7c]
mov eax, dword [ebp - 0x34]
fstp qword [ebp - 0x3c]
cmp eax, dword [ebp - 0x10]
jl 0x40d55a
xor esi, esi
inc dword [ebp - 0x30]
fld st(1)
fadd qword [ebp - 0x2c]
mov eax, dword [ebp - 0x30]
cmp eax, dword [ebp - 0xc]
fstp st(2)
jl 0x40d51c
fstp st(0)
fstp st(0)
lea eax, [ebp - 0x24]
test eax, eax
je 0x40d968
mov eax, dword [ebp - 0x24]
and eax, 0xc0000000
cmp eax, 0x40000000
jne 0x40d968
mov eax, dword [ebp - 0x24]
and eax, 0xffffff
jbe 0x40d968
cmp eax, dword [0x4ed078]
ja 0x40d968
mov ecx, dword [0x4ec470]
lea eax, [eax + eax*4]
shl eax, 3
add ecx, eax
cmp dword [ecx], 0
je 0x40d968
dec dword [ecx + 8]
mov ecx, dword [0x4ec470]
add eax, ecx
cmp dword [eax + 8], 0
jg 0x40d968
test word [eax + 0x1c], 0x3fff
jne 0x40d968
push dword [ebp - 0x24]
call fcn.00420906
pop ecx
jmp 0x40d968
push dword [ebp + 0x34]
mov eax, dword [ebp - 8]
push dword [ebp + 0x30]
push dword [ebp + 0x2c]
push dword [ebp + 0x28]
push dword [ebp + 0x24]
push dword [ebx + 0x20]
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push 0
push 0
push dword [eax + 0x20]
call dword [0x4ad018]
xor edi, edi
cmp dword [ebx + 0x24], edi
je 0x40d9a0
mov esi, dword [ebp - 8]
push edi
push esi
call fcn.0040e7eb
pop ecx
pop ecx
push dword [ebp + 0x34]
push dword [ebp + 0x30]
push dword [ebp + 0x2c]
push dword [ebp + 0x28]
push dword [ebp + 0x24]
push dword [ebx + 0x24]
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push edi
push edi
push dword [esi + 0x24]
call dword [0x4ad018]
jmp 0x40d9a3
mov esi, dword [ebp - 8]
mov eax, dword [ebp + 0x1c]
imul eax, dword [ebp + 0x28]
cdq
idiv dword [ebp + 0x30]
push dword [ebp + 0x34]
push eax
mov eax, dword [ebp + 0x18]
imul eax, dword [ebp + 0x24]
cdq
idiv dword [ebp + 0x2c]
push eax
push esi
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0040c6aa
mov esi, dword [esi + 0x10]
mov ebx, eax
mov eax, esi
and eax, 0xc0000000
add esp, 0x28
cmp eax, 0x40000000
jne 0x40da2e
mov eax, esi
and eax, 0xffffff
jbe 0x40da2e
cmp eax, dword [0x4ed078]
ja 0x40da2e
mov ecx, dword [0x4ec470]
lea eax, [eax + eax*4]
shl eax, 3
add ecx, eax
cmp dword [ecx], edi
je 0x40da2e
dec dword [ecx + 8]
mov ecx, dword [0x4ec470]
add eax, ecx
cmp dword [eax + 8], edi
jg 0x40da2e
test word [eax + 0x1c], 0x3fff
jne 0x40da2e
push esi
call fcn.00420906
pop ecx
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret